patch-2.4.21 linux-2.4.21/lib/vsprintf.c
Next file: linux-2.4.21/mm/filemap.c
Previous file: linux-2.4.21/kernel/sysctl.c
Back to the patch index
Back to the overall index
-  Lines: 13
-  Date:
2003-06-13 07:51:39.000000000 -0700
-  Orig file: 
linux-2.4.20/lib/vsprintf.c
-  Orig date: 
2001-10-11 11:17:22.000000000 -0700
diff -urN linux-2.4.20/lib/vsprintf.c linux-2.4.21/lib/vsprintf.c
@@ -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) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)