[CONC-32] The entries in include/errmsg.h and libmysql/errmsg.c don't match Created: 2013-06-18  Updated: 2013-06-18  Resolved: 2013-06-18

Status: Closed
Project: MariaDB Connector/C
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Henrik Grubbström Assignee: Georg Richter
Resolution: Duplicate Votes: 0
Labels: None
Environment:

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.



 Comments   
Comment by Georg Richter [ 2013-06-18 ]

Dup of CONC-1 which was fixed in rev. 21

Generated at Thu Feb 08 03:02:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.