summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2012-02-02 15:00:42 +0000
committerAndrey Hristov <andrey@php.net>2012-02-02 15:00:42 +0000
commitd54bdbbbe432efe83aa4b32503f2d82c39677474 (patch)
tree46a9c14b2ce50ec73ac352af59db20067651cb99 /ext/mysqlnd/mysqlnd_wireprotocol.c
parent87c038be06b8b0eb721270f98c858fd701f5d54b (diff)
downloadphp-git-d54bdbbbe432efe83aa4b32503f2d82c39677474.tar.gz
assert
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index e7cf474278..1318c37a73 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -958,7 +958,11 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *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;