diff options
author | Anatol Belski <ab@php.net> | 2014-04-24 19:36:20 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-04-24 19:36:20 +0200 |
commit | 78eeefb946b73330f3b8bdc9aa794e4fd505bc4f (patch) | |
tree | df91d5a3c633c83b7db019cab97956cc7eaa6c17 /ext | |
parent | ceec2152a680821fadeac245c9769f83c8570bf6 (diff) | |
parent | 0c381e19ad9967eaef44a12f8e259c33436913bb (diff) | |
download | php-git-78eeefb946b73330f3b8bdc9aa794e4fd505bc4f.tar.gz |
Merge branch 'PHP-5.6'
* PHP-5.6:
updated NEWS
Fixed bug #66307 Fileinfo crashes with powerpoint files
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fileinfo/libmagic/readcdf.c | 2 | ||||
-rw-r--r-- | ext/fileinfo/tests/finfo_file_002.phpt | 4 | ||||
-rw-r--r-- | ext/fileinfo/tests/resources/test.ppt | bin | 0 -> 99840 bytes |
3 files changed, 5 insertions, 1 deletions
diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index 66a18dbb87..1600625eb8 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -105,6 +105,8 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, const char *s; int len; + memset(&ts, 0, sizeof(ts)); + for (i = 0; i < count; i++) { cdf_print_property_name(buf, sizeof(buf), info[i].pi_id); switch (info[i].pi_type) { diff --git a/ext/fileinfo/tests/finfo_file_002.phpt b/ext/fileinfo/tests/finfo_file_002.phpt index feb4010f74..5cce7f3f9b 100644 --- a/ext/fileinfo/tests/finfo_file_002.phpt +++ b/ext/fileinfo/tests/finfo_file_002.phpt @@ -18,7 +18,7 @@ ksort($results); var_dump($results); ?> --EXPECTF-- -array(8) { +array(9) { ["%s/resources/dir.zip"]=> string(15) "application/zip" ["%s/resources/test.awk"]=> @@ -35,4 +35,6 @@ array(8) { string(15) "application/pdf" ["%s/resources/test.png"]=> string(9) "image/png" + ["%s/resources/test.ppt"]=> + string(29) "application/vnd.ms-powerpoint" } diff --git a/ext/fileinfo/tests/resources/test.ppt b/ext/fileinfo/tests/resources/test.ppt Binary files differnew file mode 100644 index 0000000000..713004c03d --- /dev/null +++ b/ext/fileinfo/tests/resources/test.ppt |