1
0
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:
Georg Richter
2020-10-24 07:54:59 +02:00
parent cfc36a46d1
commit 7c5a40b00d

View File

@@ -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)