mariadb/libmysql
Georgi Kodinov 107c894a54 Bug : malformed resultset packet crashes client
Several fixes :

* sql-common/client.c
Added a validity check of the fields metadata packet sent 
by the server.
Now libmysql will check if the length of the data sent by
the server matches what's expected by the protocol before
using the data.

* client/mysqltest.cc
Fixed the error handling code in mysqltest to avoid sending
new commands when the reading the result set failed (and 
there are unread data in the pipe).

* sql_common.h + libmysql/libmysql.c + sql-common/client.c
unpack_fields() now generates a proper error when it fails.
Added a new argument to this function to support the error 
generation.

* sql/protocol.cc
Added a debug trigger to cause the server to send a NULL
insted of the packet expected by the client for testing 
purposes.
2012-06-28 18:38:55 +03:00
..
.cvsignore
acinclude.m4
client_settings.h
CMakeLists.txt
conf_to_src.c
dll.c
errmsg.c
get_password.c
libmysql.c
libmysql.def
libmysql.ver.in
Makefile.am
Makefile.shared
manager.c