-
-
Notifications
You must be signed in to change notification settings - Fork 17
_php_ibase_attach_db() does not check buffer overflow #108
Copy link
Copy link
Open
Description
Line 998 in e1a3253
| dpb_len = slprintf(dpb, buf_len, "%c%c%s", dpb_args[i],(unsigned char)len[i],args[i]); |
Use snprintf() instead slprintf()
https://www.phpinternalsbook.com/php7/internal_types/strings/printing_functions.html
snprintf() returns the number of characters that could have been used, whereas slprintf() returns the number of characters that have effectively been used, thus enabling to detect too-small buffers and string truncation. This, is not counting the final ‘\0’.
Reactions are currently unavailable