summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1998-10-29 14:40:20 +0000
committerrnordier <rnordier@FreeBSD.org>1998-10-29 14:40:20 +0000
commit0f216504b58f11992a7d142ca1a48cafcd912bff (patch)
tree581a37a633ea7689891299b71fd437bc1d13cf46 /lib/libc/stdio
parent79fe648432de180e86481f8b2ec2cef7f84899e9 (diff)
downloadFreeBSD-src-0f216504b58f11992a7d142ca1a48cafcd912bff.zip
FreeBSD-src-0f216504b58f11992a7d142ca1a48cafcd912bff.tar.gz
Check for a zero-length as well as a NULL string argument.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/perror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/perror.c b/lib/libc/stdio/perror.c
index 91a7dee..bb61824 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++;
OpenPOWER on IntegriCloud