Skip to content

Commit e6e0231

Browse files
committed
Use asprintf return value for the size
1 parent b198d0c commit e6e0231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/phpdbg/phpdbg_prompt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ void phpdbg_init(char *init_file, size_t init_file_len, bool use_default) /* {{{
343343
char *sys_ini;
344344
int i;
345345

346-
ZEND_IGNORE_VALUE(asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH));
347-
phpdbg_try_file_init(sys_ini, strlen(sys_ini), 0);
346+
size_t sys_ini_length = asprintf(&sys_ini, "%s/" PHPDBG_INIT_FILENAME, PHP_CONFIG_FILE_PATH);
347+
phpdbg_try_file_init(sys_ini, sys_ini_length, 0);
348348
free(sys_ini);
349349

350350
if (!scan_dir) {

0 commit comments

Comments
 (0)