summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-16 15:34:29 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-16 15:34:47 +0100
commitedb9229b8bb653cac964a3cc33b26895a42089e6 (patch)
tree696fe467ae2192f8db8b268cd25e6190376b08cd
parentb63ea1047a5c130231cec5571861f1dcdf63a063 (diff)
parent9552cf6b84b73de38c152b97cc8d30ac3509d4a5 (diff)
downloadphp-git-edb9229b8bb653cac964a3cc33b26895a42089e6.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Handle incomplete result set metadata more gracefully
-rw-r--r--NEWS2
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 374f33d04d..b39899c085 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,8 @@ PHP NEWS
- MySQLnd:
. Fixed bug #78680 (mysqlnd's mysql_clear_password does not transmit
null-terminated password). (Daniel Black)
+ . Fixed bug #80713 (SegFault when disabling ATTR_EMULATE_PREPARES and
+ MySQL 8.0). (Nikita)
- MySQLi:
. Fixed bug #74779 (x() and y() truncating floats to integers). (cmb)
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index f98cb6c971..ba579ba403 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -1204,8 +1204,9 @@ php_mysqlnd_rset_field_read(MYSQLND_CONN_DATA * conn, void * _packet)
DBG_RETURN(PASS);
} else if (EODATA_MARKER == *p && packet->header.size < 8) {
/* Premature EOF. That should be COM_FIELD_LIST. But we don't support COM_FIELD_LIST anymore, thus this should not happen */
- DBG_INF("Premature EOF. That should be COM_FIELD_LIST");
- DBG_RETURN(PASS);
+ DBG_ERR("Premature EOF. That should be COM_FIELD_LIST");
+ php_error_docref(NULL, E_WARNING, "Premature EOF in result field metadata");
+ DBG_RETURN(FAIL);
}
meta = packet->metadata;