diff --git a/NEWS b/NEWS index 061a9e9483a..e91dee30c4f 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.2.22 +- Phar: + . Fixed bug GH-14603 (null string from zip entry). + (David Carlier) + - PHPDBG: . Fixed bug GH-14596 (crashes with ASAN and ZEND_RC_DEBUG=1). (David Carlier) diff --git a/ext/phar/tests/gh14603.phpt b/ext/phar/tests/gh14603.phpt new file mode 100644 index 00000000000..95b9fa30fd5 Binary files /dev/null and b/ext/phar/tests/gh14603.phpt differ diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 1472906c8b9..b610104acad 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -771,7 +771,7 @@ foundit: } } - zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), actual_alias, mydata->alias_len, mydata); + zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata); mydata->alias = pestrndup(alias, alias_len, mydata->is_persistent); mydata->alias_len = alias_len; } else {