Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
mariadb-native-client 1.0.0
Description
$ tail -5 include/errmsg.h
#define CR_NEW_STMT_METADATA 2057
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2058
#define CR_ALREADY_CONNECTED 2059
#define SQLSTATE_UNKNOWN "HY000"
$ tail -15 libmysql/errmsg.c
/* 2054 */ "",
/* 2055 */ "",
/* 2056 */ "",
/* 2057 */ "The number of parameters in bound buffers differs from number of columns in resultset",
/* 2058 */ "Can't connect twice. Already connected",
/* 2059 */ "Plugin %s could not be loaded: %s",
""
};
#endif
void init_client_errs(void)
{
my_errmsg[CLIENT_ERRMAP] = &client_errors[0];
}
Note that CR_AUTH_PLUGIN_CANNOT_LOAD and CR_ALREADY_CONNECTED have been swapped between the files.
I've marked the priority as Major since format string # 2059 contains %s-formatting, which won't be provided with CR_AUTH_ALREADY_CONNECTED and thus probably cause a NULL (or similar) deref.