In vsscanf in vsprintf.c incorectly uses isdigit to check for a leading
numeric
after finding a %x and setting the base to 16. This breaks device
mapper under
certain conditions. Following patch is backport from 2.5.50.
--- vsprintf.c Thu Oct 11 13:17:22 2001
+++ /usr/src/linux-2.4.20/lib/vsprintf.c Fri Dec 13 09:57:14 2002
@@ -637,7 +637,11 @@
while (isspace(*str))
str++;
- if (!*str || !isdigit(*str))
+ if (!*str
+ || (base == 16 && !isxdigit(*str))
+ || (base == 10 && !isdigit(*str))
+ || (base == 8 && (!isdigit(*str) || *str > '7'))
+ || (base == 0 && !isdigit(*str)))
break;
switch(qualifier) {
-
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/
This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:29 EST