mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
Use snprintf to make the static analyzers happy
This commit is contained in:
parent
6c0c4896b3
commit
cbd4f7602e
@ -1713,7 +1713,7 @@ ZEND_FUNCTION(create_function)
|
||||
function_name[0] = '\0';
|
||||
|
||||
do {
|
||||
function_name_length = 1 + sprintf(function_name + 1, "lambda_%d", ++EG(lambda_count));
|
||||
function_name_length = 1 + snprintf(function_name + 1, sizeof("0lambda_")+MAX_LENGTH_OF_LONG, "lambda_%d", ++EG(lambda_count));
|
||||
} while (zend_hash_add(EG(function_table), function_name, function_name_length+1, &new_function, sizeof(zend_function), NULL)==FAILURE);
|
||||
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
|
||||
RETURN_STRINGL(function_name, function_name_length, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user