diff options
author | Andrey Hristov <andrey@php.net> | 2012-02-02 15:00:42 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2012-02-02 15:00:42 +0000 |
commit | da0da10bc9627bb4d67a6b76524adfb5deb2c75d (patch) | |
tree | 27f58af62b620f7c22cb922bebfca3c1680d43ba | |
parent | cc1829d187bb57ad55e5258f07be0da49b0c0de2 (diff) | |
download | php-git-da0da10bc9627bb4d67a6b76524adfb5deb2c75d.tar.gz |
assert
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 4529a9447f..4d2bb8cac7 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1177,7 +1177,11 @@ php_mysqlnd_rset_field_read(void * _packet, MYSQLND_CONN_DATA * conn TSRMLS_DC) BAIL_IF_NO_MORE_DATA; } - /* 1 byte filler */ + /* 1 byte length */ + if (12 != *p) { + DBG_ERR_FMT("Protocol error. Server sent false length. Expected 12 got %d", (int) *p); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol error. Server sent false length. Expected 12"); + } p++; BAIL_IF_NO_MORE_DATA; |