mirror of
https://github.com/php/php-src.git
synced 2024-12-01 22:03:36 +08:00
- Need to terminate [v]uspprintf() with two \0
This commit is contained in:
parent
383673b508
commit
b7e23d00c6
@ -847,6 +847,7 @@ PHPAPI int vuspprintf(char **pbuf, size_t max_len, const char *format, va_list a
|
||||
if (max_len && xbuf.len > max_len) {
|
||||
xbuf.len = max_len;
|
||||
}
|
||||
smart_str_appendc(&xbuf, '\0'); /* we need \0\0 as termination */
|
||||
smart_str_0(&xbuf);
|
||||
|
||||
*pbuf = xbuf.c;
|
||||
|
Loading…
Reference in New Issue
Block a user