com php-src: backport this piece from 5.6, related to the #66307 fix: ext/fileinfo/libmagic/readcdf.c

From: Date: Tue, 27 May 2014 01:05:13 +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-78554@lists.php.net to get a copy of this message
Commit: d184f07b3ccc30113ae11dd68f987f6cefe36d79 Author: Anatol Belski <ab@php.net> Thu, 24 Apr 2014 19:50:23 +0200 Committer: Stanislav Malyshev <stas@php.net> Mon, 26 May 2014 18:05:13 -0700 Parents: 15ee33eb21275b1c4562f61e111c52b73d635640 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d184f07b3ccc30113ae11dd68f987f6cefe36d79 Log: backport this piece from 5.6, related to the #66307 fix 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 ade10b2..820f24d 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,

« previous php.cvs (#78554) next »