Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-32

The entries in include/errmsg.h and libmysql/errmsg.c don't match

    XMLWordPrintable

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.

      Attachments

        Activity

          People

            georg Georg Richter
            grubba Henrik Grubbström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.