Skip to content

Commit

Permalink
Use asprintf return value for the size
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdos committed Dec 18, 2023
1 parent b198d0c commit e6e0231
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sapi/phpdbg/phpdbg_prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ void phpdbg_init(char *init_file, size_t init_file_len, bool use_default) /* {{{
char *sys_ini;
int i;

ZEND_IGNORE_VALUE(asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH));
phpdbg_try_file_init(sys_ini, strlen(sys_ini), 0);
size_t sys_ini_length = asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH);
phpdbg_try_file_init(sys_ini, sys_ini_length, 0);
free(sys_ini);

if (!scan_dir) {
Expand Down

0 comments on commit e6e0231

Please sign in to comment.