mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion)
Fixed regression of bug 38710. Already fixed in HEAD. #HEAD will be fixed when doing the next merge from svn
This commit is contained in:
parent
e56466edc8
commit
649152ca49
3 changed files with 11 additions and 3 deletions
1
NEWS
1
NEWS
|
@ -24,6 +24,7 @@ PHP NEWS
|
|||
compression stream). (Ilia)
|
||||
- Fixed bug #42488 (SoapServer reports an encoding error and the error itself
|
||||
breaks). (Dmitry)
|
||||
- Fixed bug #42378 (mysqli_stmt_bind_result memory exhaustion). (Andrey)
|
||||
- Fixed bug #42359 (xsd:list type not parsed). (Dmitry)
|
||||
- Fixed bug #42326 (SoapServer crash). (Dmitry)
|
||||
- Fixed bug #42214 (SoapServer sends clients internal PHP errors). (Dmitry)
|
||||
|
|
|
@ -325,6 +325,9 @@ PHP_FUNCTION(mysqli_stmt_bind_result)
|
|||
case MYSQL_TYPE_VAR_STRING:
|
||||
case MYSQL_TYPE_STRING:
|
||||
case MYSQL_TYPE_BLOB:
|
||||
case MYSQL_TYPE_TINY_BLOB:
|
||||
case MYSQL_TYPE_MEDIUM_BLOB:
|
||||
case MYSQL_TYPE_LONG_BLOB:
|
||||
case MYSQL_TYPE_TIMESTAMP:
|
||||
case MYSQL_TYPE_DECIMAL:
|
||||
#ifdef FIELD_TYPE_NEWDECIMAL
|
||||
|
@ -2000,7 +2003,10 @@ PHP_FUNCTION(mysqli_stmt_store_result)
|
|||
double - but this is a known problem of the simple MySQL API ;)
|
||||
*/
|
||||
for (i = mysql_stmt_field_count(stmt->stmt) - 1; i >=0; --i) {
|
||||
if (stmt->stmt->fields && stmt->stmt->fields[i].type == MYSQL_TYPE_BLOB) {
|
||||
if (stmt->stmt->fields && (stmt->stmt->fields[i].type == MYSQL_TYPE_BLOB ||
|
||||
stmt->stmt->fields[i].type == MYSQL_TYPE_MEDIUM_BLOB ||
|
||||
stmt->stmt->fields[i].type == MYSQL_TYPE_LONG_BLOB))
|
||||
{
|
||||
my_bool tmp=1;
|
||||
mysql_stmt_attr_set(stmt->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &tmp);
|
||||
break;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue