Check for a zero-length as well as a NULL string argument.
This commit is contained in:
parent
79fe648432
commit
0f216504b5
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user