diff options
author | Anatol Belski <ab@php.net> | 2014-04-24 19:50:23 +0200 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2014-07-18 15:50:04 -0700 |
commit | 44be7b7f276e3536395ab22fd67d11a31f8dad79 (patch) | |
tree | 26634391632b0f8f0835ce55400f2f5426307e82 | |
parent | 0335d2ef3efbcb5f45e753a34fd7b74188997d87 (diff) | |
download | php-git-44be7b7f276e3536395ab22fd67d11a31f8dad79.tar.gz |
backport this piece from 5.6, related to the #66307 fix
Conflicts:
ext/fileinfo/libmagic/readcdf.c
-rw-r--r-- | ext/fileinfo/libmagic/readcdf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index dc6bcf094b..bfc32d6652 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -149,7 +149,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, return -1; } c = cdf_ctime(&sec); - if ((ec = strchr(c, '\n')) != NULL) + if (c != NULL && + (ec = strchr(c, '\n')) != NULL) *ec = '\0'; if (NOTMIME(ms) && file_printf(ms, |