Skip to content

Commit 5dd9651

Browse files
dixyesnielsdos
authored andcommitted
Free opened_path when opened_path_len >= MAXPATHLEN
Closes GH-19240.
1 parent a7cdf0b commit 5dd9651

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ PHP NEWS
3939
(ilutov)
4040
. Fix theoretical issues with hrtime() not being available. (nielsdos)
4141

42+
- Windows:
43+
. Free opened_path when opened_path_len >= MAXPATHLEN. (dixyes)
44+
4245
31 Jul 2025, PHP 8.3.24
4346

4447
- Calendar:

main/php_open_temporary_file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, zend_st
157157
free(cwdw);
158158
free(pfxw);
159159
efree(new_state.cwd);
160+
free(opened_path);
160161
return -1;
161162
}
162163
assert(strlen(opened_path) == opened_path_len);

0 commit comments

Comments
 (0)