diff options
author | Anatol Belski <ab@php.net> | 2014-09-17 09:16:59 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-17 09:16:59 +0200 |
commit | 42fca623263599100746ce8e02f01b8c52311987 (patch) | |
tree | a707c6e96f353d29065e5ee69eb598997d490df2 | |
parent | 2ace2d1b8a0b8a250233b6dee2f019dae29b0faa (diff) | |
download | php-git-42fca623263599100746ce8e02f01b8c52311987.tar.gz |
improve empty string check
-rw-r--r-- | ext/zip/lib/zip_set_name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zip/lib/zip_set_name.c b/ext/zip/lib/zip_set_name.c index 02fa1272d6..4793c54534 100644 --- a/ext/zip/lib/zip_set_name.c +++ b/ext/zip/lib/zip_set_name.c @@ -58,7 +58,7 @@ _zip_set_name(struct zip *za, zip_uint64_t idx, const char *name, zip_flags_t fl return -1; } - if (name && strlen(name) > 0) { + if (name && name[0] != '\0') { /* TODO: check for string too long */ if ((str=_zip_string_new((const zip_uint8_t *)name, (zip_uint16_t)strlen(name), flags, &za->error)) == NULL) return -1; |