Bug#29948: Unchecked NULL pointer caused server crash.
The cli_read_binary_rows function is used to fetch data from the server after a prepared statement execution. It accepts a statement handler and gets the connection handler from it. But when the auto-reconnect option is set the connection handler is reset to NULL after reconnection because the prepared statement is lost and the handler became useless. This case wasn't checked in the cli_read_binary_rows function and caused server crash. Now the cli_read_binary_rows function checks the connection handler to be not NULL and returns an error if it is. tests/mysql_client_test.c: Added a test case for the bug#29948: Unchecked NULL pointer caused server crash. libmysql/libmysql.c: Bug#29948: Unchecked NULL pointer caused server crash. Now the cli_read_binary_rows function checks the connection handler to be not NULL and returns an error if it is.
Showing
Please register or sign in to comment