Skip to content

Commit bf68d10

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents c9bd540 + df579ad commit bf68d10

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ PHP NEWS
1717
misleadingly with the wrong return type. (nielsdos)
1818
. Fix bug GH-10570 (Fixed unknown string hash on property fetch with integer
1919
constant name). (nielsdos)
20+
. Fixed php_fopen_primary_script() call resulted on zend_destroy_file_handle()
21+
freeing dangling pointers on the handle as it was uninitialized. (nielsdos)
2022

2123
- Curl:
2224
. Fixed deprecation warning at compile time. (Max Kellermann)

main/fopen_wrappers.c

+2
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,8 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle)
353353
size_t length;
354354
bool orig_display_errors;
355355

356+
memset(file_handle, 0, sizeof(zend_file_handle));
357+
356358
path_info = SG(request_info).request_uri;
357359
#if HAVE_PWD_H
358360
if (PG(user_dir) && *PG(user_dir) && path_info && '/' == path_info[0] && '~' == path_info[1]) {

0 commit comments

Comments
 (0)