You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-05 15:55:58 +03:00
Fix for CONC-510: CoreDump using set env MARIADB_PLUGIN_DIR
The macro CLEAR_CLIENT_ERROR needs to check if mysql->net.extension was already allocated to prevent access of uninitialized memory.
This commit is contained in:
@@ -148,7 +148,8 @@ extern const char *SQLSTATE_UNKNOWN;
|
||||
(a)->net.last_errno= 0;\
|
||||
strcpy((a)->net.sqlstate, "00000");\
|
||||
(a)->net.last_error[0]= '\0';\
|
||||
(a)->net.extension->extended_errno= 0;\
|
||||
if ((a)->net.extension)\
|
||||
(a)->net.extension->extended_errno= 0;\
|
||||
} while (0)
|
||||
|
||||
#define MYSQL_COUNT_ERROR (~(unsigned long long) 0)
|
||||
|
Reference in New Issue
Block a user