patch-2.4.23 linux-2.4.23/lib/vsprintf.c

Next file: linux-2.4.23/mm/filemap.c
Previous file: linux-2.4.23/lib/firmware_class.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/lib/vsprintf.c linux-2.4.23/lib/vsprintf.c
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 
 #include <asm/div64.h>
+#include <asm/page.h>
 
 /**
  * simple_strtoul - convert a string to an unsigned long
@@ -341,7 +342,7 @@
 
 			case 's':
 				s = va_arg(args, char *);
-				if (!s)
+				if ((unsigned long)s < PAGE_SIZE)
 					s = "<NULL>";
 
 				len = strnlen(s, precision);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)