diff options
| author | Anatol Belski <ab@php.net> | 2014-04-24 19:50:23 +0200 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2014-05-26 18:05:13 -0700 |
| commit | d184f07b3ccc30113ae11dd68f987f6cefe36d79 (patch) | |
| tree | 940793cc5161ea83881e0ce8542f0e9f86a386aa | |
| parent | 15ee33eb21275b1c4562f61e111c52b73d635640 (diff) | |
| download | php-git-d184f07b3ccc30113ae11dd68f987f6cefe36d79.tar.gz | |
backport this piece from 5.6, related to the #66307 fix
| -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 ade10b2bf7..820f24d0d7 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, tbuf); - if ((ec = strchr(c, '\n')) != NULL) + if (c != NULL && + (ec = strchr(c, '\n')) != NULL) *ec = '\0'; if (NOTMIME(ms) && file_printf(ms, |
