Skip to content

Commit

Permalink
Merge branch 'PHP-5.5' into PHP-5.6
Browse files Browse the repository at this point in the history
* PHP-5.5:
  Fixed bug #66307 Fileinfo crashes with powerpoint files

Conflicts:
	ext/fileinfo/libmagic/readcdf.c
  • Loading branch information
weltling committed Apr 24, 2014
2 parents cd26419 + 03fa550 commit 74ce9da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ext/fileinfo/libmagic/readcdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion ext/fileinfo/tests/finfo_file_002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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"]=>
Expand All @@ -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"
}
Binary file added ext/fileinfo/tests/resources/test.ppt
Binary file not shown.

0 comments on commit 74ce9da

Please sign in to comment.