Loading...
stdio/FreeBSD/puts.c.patch Libc-320.1.3 /dev/null
--- Libc/Libc-320.1.3/stdio/FreeBSD/puts.c.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- puts.c.orig	Tue May 20 15:22:43 2003
-+++ puts.c	Thu Jul 31 13:21:00 2003
-@@ -47,6 +47,9 @@
- #include "fvwrite.h"
- #include "libc_private.h"
- 
-+// 3340719: __puts_null__ is used if string is NULL.  Shared by fputs.c
-+__private_extern__ char const __puts_null__[] = "(null)";
-+
- /*
-  * Write the given string to stdout, appending a newline.
-  */
-@@ -55,12 +58,15 @@
- 	char const *s;
- {
- 	int retval;
--	size_t c = strlen(s);
-+	size_t c;
- 	struct __suio uio;
- 	struct __siov iov[2];
- 
-+	// 3340719: __puts_null__ is used if s is NULL
-+	if(s == NULL)
-+		s = __puts_null__;
- 	iov[0].iov_base = (void *)s;
--	iov[0].iov_len = c;
-+	iov[0].iov_len = c = strlen(s);
- 	iov[1].iov_base = "\n";
- 	iov[1].iov_len = 1;
- 	uio.uio_resid = c + 1;