You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +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,6 +148,7 @@ extern const char *SQLSTATE_UNKNOWN;
|
||||
(a)->net.last_errno= 0;\
|
||||
strcpy((a)->net.sqlstate, "00000");\
|
||||
(a)->net.last_error[0]= '\0';\
|
||||
if ((a)->net.extension)\
|
||||
(a)->net.extension->extended_errno= 0;\
|
||||
} while (0)
|
||||
|
||||
|
Reference in New Issue
Block a user