patch-2.4.18 linux/drivers/char/lp.c
Next file: linux/drivers/char/mwave/mwavedd.c
Previous file: linux/drivers/char/keyboard.c
Back to the patch index
Back to the overall index
-  Lines: 9
-  Date:
Mon Jan  7 13:38:04 2002
-  Orig file: 
linux.orig/drivers/char/lp.c
-  Orig date: 
Mon Feb 18 20:18:39 2002
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/drivers/char/lp.c linux/drivers/char/lp.c
@@ -650,7 +650,7 @@
 	do {
 		/* Write the data, converting LF->CRLF as we go. */
 		ssize_t canwrite = count;
-		char *lf = strchr (s, '\n');
+		char *lf = memchr (s, '\n', count);
 		if (lf)
 			canwrite = lf - s;
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)