com php-src: backport this piece from 5.6, related to the #66307 fix: ext/fileinfo/libmagic/readcdf.c
| From: | Johannes Schlüter | Date: | Fri, 18 Jul 2014 22:50:04 +0000 |
| Subject: | com php-src: backport this piece from 5.6, related to the #66307 fix: ext/fileinfo/libmagic/readcdf.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79644@lists.php.net to get a copy of this message | ||
Commit: 44be7b7f276e3536395ab22fd67d11a31f8dad79
Author: Anatol Belski <ab@php.net> Thu, 24 Apr 2014 19:50:23 +0200
Committer: Stanislav Malyshev <stas@php.net> Fri, 18 Jul 2014 15:50:04 -0700
Parents: 0335d2ef3efbcb5f45e753a34fd7b74188997d87
Branches: PHP-5.3
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=44be7b7f276e3536395ab22fd67d11a31f8dad79
Log:
backport this piece from 5.6, related to the #66307 fix
Conflicts:
ext/fileinfo/libmagic/readcdf.c
Bugs:
https://bugs.php.net/66307
Changed paths:
M ext/fileinfo/libmagic/readcdf.c
Diff:
diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c
index dc6bcf0..bfc32d6 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,