[PATCH 2.4] I2C updates for 2.4.28 (2/5)

From: Jean Delvare
Date: Sat Nov 20 2004 - 07:25:40 EST


Original report and discussion:
http://archives.andrew.net.au/lm-sensors/msg28053.html

Bottom line:
The real parser in i2c-proc is partly broken, but in a way it will go
unnoticed in most cases (thus unspotted so far). Still worth fixing
IMHO.

Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>

--- linux-2.4.28-pre4/drivers/i2c/i2c-proc.c.orig 2004-10-16 12:44:30.000000000 +0200
+++ linux-2.4.28-pre4/drivers/i2c/i2c-proc.c 2004-10-16 12:46:38.000000000 +0200
@@ -540,7 +540,7 @@
/* Skip everything until we hit whitespace */
while (bufsize &&
!((ret=get_user(nextchar, (char *) buffer))) &&
- isspace((int) nextchar)) {
+ !isspace((int) nextchar)) {
bufsize--;
((char *) buffer)++;
}


--
Jean Delvare
http://khali.linux-fr.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/