chiark / gitweb /
fix off by one error in range check
authorian <ian>
Mon, 22 Dec 2008 22:08:48 +0000 (22:08 +0000)
committerian <ian>
Mon, 22 Dec 2008 22:08:48 +0000 (22:08 +0000)
hostside/evdev-manip.c

index 023bbde31a4a180214b4daa4e3af52894b07d8cf..0a128b53cc6030e33cf8b6ddf8f37677af4514fe 100644 (file)
@@ -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;