* evdev: Fix a buffer overflow on BIG_ENDIAN systems
@ 2007-05-11 0:54 kenichi3.nagai
2007-05-11 5:10 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: kenichi3.nagai @ 2007-05-11 0:54 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, dtor
I found a little mistake.
On TOSHIBA Cell refference system(BIG_ENDIAN systems) a buffer overflow
was occured when I specified smaller buffers than maxlen.
Best regards,
Kenichi Nagai
Semiconductor Company
TOSHIBA Corporation
Kenichi3.nagai@toshiba.co.jp
Signed-off-by: Kenichi Nagai <kenichi3.nagai@toshiba.co.jp>
---
--- drivers/input/evdev.c.orig 2007-04-14 05:48:14.000000000 +0900
+++ drivers/input/evdev.c 2007-04-19 09:36:19.000000000 +0900
@@ -320,7 +320,7 @@ static int bits_to_user(unsigned long *b
if (compat) {
len = NBITS_COMPAT(maxbit) * sizeof(compat_long_t);
- if (len < maxlen)
+ if (len > maxlen)
len = maxlen;
for (i = 0; i < len / sizeof(compat_long_t); i++)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-11 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 0:54 evdev: Fix a buffer overflow on BIG_ENDIAN systems kenichi3.nagai
2007-05-11 5:10 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).