Description
Dynamic memory, referenced by res, is allocated at phpdbg_utils.c:154 :
|
PHPDBG_API char *phpdbg_resolve_path(const char *path) /* {{{ */ |
|
{ |
|
char resolved_name[MAXPATHLEN]; |
|
|
|
if (expand_filepath(path, resolved_name) == NULL) { |
|
return NULL; |
|
} |
|
|
|
return strdup(resolved_name); |
|
} /* }}} */ |
by calling function phpdbg_resolve_path at phpdbg_prompt.c:405 and lost at phpdbg_prompt.c:411 :
|
char *res = phpdbg_resolve_path(param->str); |
|
size_t res_len = strlen(res); |
|
|
|
if ((res_len != PHPDBG_G(exec_len)) || (memcmp(res, PHPDBG_G(exec), res_len) != SUCCESS)) { |
|
if (PHPDBG_G(in_execution)) { |
|
if (phpdbg_ask_user_permission("Do you really want to stop execution to set a new execution context?") == FAILURE) { |
|
return FAILURE; |
|
} |
The allocated memory will be lost even if the condition at phpdbg_prompt.c:408 is false.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E. Bykhanova.
PHP Version
PHP 8.2.3
Operating System
ALT Linux
Description
Dynamic memory, referenced by
res, is allocated at phpdbg_utils.c:154 :php-src/sapi/phpdbg/phpdbg_utils.c
Lines 146 to 155 in cde956a
by calling function
phpdbg_resolve_pathat phpdbg_prompt.c:405 and lost at phpdbg_prompt.c:411 :php-src/sapi/phpdbg/phpdbg_prompt.c
Lines 405 to 412 in cde956a
The allocated memory will be lost even if the condition at phpdbg_prompt.c:408 is false.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E. Bykhanova.
PHP Version
PHP 8.2.3
Operating System
ALT Linux