From e524a581b1961a489bf88710e39f4377ffda5eac Mon Sep 17 00:00:00 2001 From: Robert Nordier Date: Thu, 29 Oct 1998 14:40:20 +0000 Subject: [PATCH] Check for a zero-length as well as a NULL string argument. --- lib/libc/stdio/perror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c index 91a7dee8b26..bb618247e96 100644 --- a/lib/libc/stdio/perror.c +++ b/lib/libc/stdio/perror.c @@ -50,7 +50,7 @@ perror(s) struct iovec iov[4]; v = iov; - if (s != NULL) { + if (s != NULL && *s != '\0') { v->iov_base = (char *)s; v->iov_len = strlen(s); v++;