From ef82918f7897e3698aa29cae8093297a24ab4934 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Tue, 26 Nov 2024 02:57:15 +0100 Subject: eizoctl: more careful data handling --- eizoctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eizoctl.c') 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++) -- cgit v1.2.3-70-g09d2