mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +08:00
Added buffer length checks
This commit is contained in:
parent
b154f188d1
commit
794845234e
@ -5485,7 +5485,7 @@ static inline int build_assignment_string(smart_str *querystr, HashTable *ht, co
|
||||
smart_str_append_long(querystr, Z_LVAL_PP(val));
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
smart_str_appendl(querystr, buf, sprintf(buf, "%f", Z_DVAL_PP(val)));
|
||||
smart_str_appendl(querystr, buf, MIN(snprintf(buf, sizeof(buf), "%f", Z_DVAL_PP(val)), sizeof(buf)-1));
|
||||
break;
|
||||
default:
|
||||
/* should not happen */
|
||||
|
Loading…
Reference in New Issue
Block a user