Skip to content

Commit

Permalink
Merge branch 'PHP-8.4'
Browse files Browse the repository at this point in the history
* PHP-8.4:
  Fix potential OOB when checking for trailing spaces
  • Loading branch information
cmb69 committed Jan 15, 2025
2 parents 8d6f46d + b702eaf commit 39f1d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion win32/winutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PHP_WINUTIL_API void php_win32_error_msg_free(char *msg)

int php_win32_check_trailing_space(const char * path, const size_t path_len)
{/*{{{*/
if (path_len > MAXPATHLEN - 1) {
if (path_len == 0 || path_len > MAXPATHLEN - 1) {
return 1;
}
if (path) {
Expand Down

0 comments on commit 39f1d25

Please sign in to comment.