Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-392

SQLSetConnectAttr(SQL_ATTR_CURRENT_CATALOG) can work incorrectly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.1.18
    • 3.1.19, 3.2.1
    • General
    • None

    Description

      That could be possible if the attribute value is passed with length, and not with SQL_NTS and ANSI API is used(i.e. SQLSetConnectAttr and not SQLSetConnectAttrW) . Even if the string itself is NULL-terminated, but terminating NULL is not included into string length) on Windows DM maps the call to widechar function, and while transcoding string to unicode, it uses only passed number of characters, and transcoded string could end up not NULL-terminated(actually not always, but that is more like magic).
      Since nobody ever hit it - it's probably minor.

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.