diff options
author | rnordier <rnordier@FreeBSD.org> | 1998-10-29 14:40:20 +0000 |
---|---|---|
committer | rnordier <rnordier@FreeBSD.org> | 1998-10-29 14:40:20 +0000 |
commit | 0f216504b58f11992a7d142ca1a48cafcd912bff (patch) | |
tree | 581a37a633ea7689891299b71fd437bc1d13cf46 /lib | |
parent | 79fe648432de180e86481f8b2ec2cef7f84899e9 (diff) | |
download | FreeBSD-src-0f216504b58f11992a7d142ca1a48cafcd912bff.zip FreeBSD-src-0f216504b58f11992a7d142ca1a48cafcd912bff.tar.gz |
Check for a zero-length as well as a NULL string argument.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/stdio/perror.c | 2 |
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++; |