1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixes for bugs #2274 "mysqld gets SIGSEGV during processing of malformed

COM_EXECUTE packet" and #2795 "prepare + execute without bind_param crashes
 server" and #2473 "seg fault running tests/client_test.c": 
- length checking added to packet parser 
- default impelemntation of Item_param::set_param_func will work in
case of malformed packet.
No test cases are possible in our test suite, as there are no tests 
operating on protocol layer.


sql/item.cc:
  Default set_param function implemented: this is to not sigsegv in case
  of malformed packet with no parameters data.
sql/item.h:
  - Item_param constructor moved to .cc to be able to assign set_param_func.
  - now embedded and ordinary versions of set_param have the same signature.
sql/mysql_priv.h:
  mysql_stmt_execute now requires packet_length
sql/sql_parse.cc:
  mysql_stmt_execute now requires packet length.
sql/sql_prepare.cc:
  - length checking added to all functions working with network packet.
  - set_param_func's in embedded and ordinary version now have the same 
  signature
This commit is contained in:
unknown
2004-03-15 20:20:47 +03:00
parent 5148b00511
commit ef44fb9af3
5 changed files with 114 additions and 57 deletions

View File

@ -1405,7 +1405,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
case COM_EXECUTE:
{
mysql_stmt_execute(thd, packet);
mysql_stmt_execute(thd, packet, packet_length);
break;
}
case COM_LONG_DATA: