mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Improve fix for bug #81740
This commit is contained in:
parent
5975f33c37
commit
a6a80eefe0
3 changed files with 17 additions and 4 deletions
|
@ -227,8 +227,8 @@ static zend_string *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const zend_string
|
|||
static zend_string* sqlite_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype)
|
||||
{
|
||||
char *quoted;
|
||||
if (unquotedlen > (INT_MAX - 3) / 2) {
|
||||
return 0;
|
||||
if (ZSTR_LEN(unquoted) > (INT_MAX - 3) / 2) {
|
||||
return NULL;
|
||||
}
|
||||
quoted = safe_emalloc(2, ZSTR_LEN(unquoted), 3);
|
||||
/* TODO use %Q format? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue