1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Fix for CONC-167: fix crash when fetching MYSQL_TYPE_BIT data.

MYSQL_TYPE_BIT has no fixed packlength, so we need to check
net_field_length instead
This commit is contained in:
Georg Richter
2016-04-12 12:34:11 +02:00
parent 72a314295b
commit 01f18549dd
2 changed files with 51 additions and 1 deletions

View File

@@ -1018,7 +1018,7 @@ void mysql_init_ps_subsystem(void)
mysql_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].max_len = -1;
mysql_ps_fetch_functions[MYSQL_TYPE_BIT].func = ps_fetch_bin;
mysql_ps_fetch_functions[MYSQL_TYPE_BIT].pack_len = 8;
mysql_ps_fetch_functions[MYSQL_TYPE_BIT].pack_len = MYSQL_PS_SKIP_RESULT_STR;
mysql_ps_fetch_functions[MYSQL_TYPE_BIT].max_len = -1;
mysql_ps_fetch_functions[MYSQL_TYPE_VAR_STRING].func = ps_fetch_string;