You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have detected a potential memory leak in sapi/fuzzer/fuzzer-unserializehash.c(line 43), sapi/fuzzer/fuzzer-unserialize.c(line 38) , sapi/fuzzer/fuzzer-json.c(line 39), sapi/fuzzer/fuzzer-mbregex.c(line 39)
I ran cppchecker on the fuzzer components and discovered several memory leaks. The issue is caused by the allocated memory for orig_data/ data which is not freed when fuzzer_request_startup() returns FAILURE. This happens because the function returns immediately without calling free(orig_data) / free(data), leading to a memory leak.
CppCheck Error Message:
fuzzer-json.c:39:3: error: Memory leak: data [memleak]
return 0;
fuzzer-mbregex.c:39:3: error: Memory leak: data [memleak]
return 0;
Description
I have detected a potential memory leak in
sapi/fuzzer/fuzzer-unserializehash.c
(line 43),sapi/fuzzer/fuzzer-unserialize.c
(line 38) ,sapi/fuzzer/fuzzer-json.c
(line 39),sapi/fuzzer/fuzzer-mbregex.c
(line 39)I ran cppchecker on the fuzzer components and discovered several memory leaks. The issue is caused by the allocated memory for
orig_data
/data
which is not freed whenfuzzer_request_startup()
returnsFAILURE
. This happens because the function returns immediately without callingfree(orig_data)
/free(data)
, leading to a memory leak.CppCheck Error Message:
I will submit a pull request with a fix shortly.
PHP Version
PHP 8.3
Operating System
No response
The text was updated successfully, but these errors were encountered: