Skip to content

Commit 686afc1

Browse files
committed
Fix phpGH-14603: invalid null zip file entry.
close phpGH-14610
1 parent 6704c60 commit 686afc1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.22
44

5+
- Phar:
6+
. Fixed bug GH-14603 (null string from zip entry).
7+
(David Carlier)
8+
59
- PHPDBG:
610
. Fixed bug GH-14596 (crashes with ASAN and ZEND_RC_DEBUG=1).
711
(David Carlier)

ext/phar/tests/gh14603.phpt

1.17 KB
Binary file not shown.

ext/phar/zip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, size_t fname_len, char *alia
771771
}
772772
}
773773

774-
zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alias_len, mydata);
774+
zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata);
775775
mydata->alias = pestrndup(alias, alias_len, mydata->is_persistent);
776776
mydata->alias_len = alias_len;
777777
} else {

0 commit comments

Comments
 (0)