summaryrefslogtreecommitdiff
path: root/eizoctl.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-11-26 02:57:15 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-11-26 02:57:15 +0100
commitef82918f7897e3698aa29cae8093297a24ab4934 (patch)
tree030508e3aabac370c325cfa1785e4fb0763b3f9f /eizoctl.c
parentc3f20ee473af00c8e9fe83e5cee550a46c7cae38 (diff)
downloadusb-drivers-ef82918f7897e3698aa29cae8093297a24ab4934.tar.gz
usb-drivers-ef82918f7897e3698aa29cae8093297a24ab4934.tar.xz
usb-drivers-ef82918f7897e3698aa29cae8093297a24ab4934.zip
eizoctl: more careful data handling
Diffstat (limited to 'eizoctl.c')
-rw-r--r--eizoctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eizoctl.c b/eizoctl.c
index eadb1e0..727171c 100644
--- a/eizoctl.c
+++ b/eizoctl.c
@@ -950,7 +950,7 @@ eizo_watch(struct eizo_monitor *m)
continue;
}
if (r->report_size == 16)
- for (size_t i = 0; i < rlen; i += 2)
+ for (size_t i = 0; i + 1 < rlen; i += 2)
printf(" %04x", peek_u16le(&buf[7 + i]));
else
for (size_t i = 0; i < rlen; i++)