From c97bfbedd2eb0cadf74cd894cdf1eec363384789 Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 22 Dec 2008 22:08:48 +0000 Subject: [PATCH] fix off by one error in range check --- hostside/evdev-manip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostside/evdev-manip.c b/hostside/evdev-manip.c index 023bbde..0a128b5 100644 --- a/hostside/evdev-manip.c +++ b/hostside/evdev-manip.c @@ -214,7 +214,7 @@ static void tab_redact(const InputEventStringInfo *strings, int nstrings, unsigned long value, char hexbuf[MAXTABSTRH], const char *sb[2]) { const InputEventStringInfo *string; - if (value <= nstrings && + if (value < nstrings && (string= &strings[value], string->prefix)) { sb[0]= string->prefix; -- 2.30.2