lkml.org 
[lkml]   [2004]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Fix NR_KEYS off-by-one error
From
Date
Vojtech Pavlik <vojtech@suse.cz> writes:

> On Sat, Jul 17, 2004 at 01:35:59AM +0900, OGAWA Hirofumi wrote:
> > KDGKBENT ioctl can use 256 entries (0-255), but it was defined as
> > key_map[NR_KEYS] (NR_KEYS == 255). The code seems also thinking it's 256.
> >
> > key_map[0] = U(K_ALLOCATED);
> > for (j = 1; j < NR_KEYS; j++)
> > key_map[j] = U(K_HOLE);
>
> The patch below might cause problems, though, because some apps may (in
> old versions are) using a char variable to index up to NR_KEYS, which
> leads to an endless loop.

Maybe. But isn't it just bug of apps?
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.087 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site