Uploaded image for project: 'MariaDB Connector/C++'
  1. MariaDB Connector/C++
  2. CONCPP-116

Setting parameter with setByte can crash the driver during execution

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.0.2, 1.1.2
    • 1.0.3, 1.1.3
    • General
    • None

    Description

      Depending on value Byte parameter could cause use of array index out of the range.
      getByte also has problem of returning correct value in case of binary field.
      This problem was reported in this PR

      Attachments

        Activity

          Lawrin Lawrin Novitsky added a comment - - edited

          The fix and testcases have been pushed. There was an error with setByte method causing crash during query execution because of wrong >> operation resulting in wrong array index.
          Also, the counterpart method - getByte had error, along with all other integer getters. In case of binary data they tried to read it as a string and convert to string as integer, and thus returning wrong values

          Lawrin Lawrin Novitsky added a comment - - edited The fix and testcases have been pushed. There was an error with setByte method causing crash during query execution because of wrong >> operation resulting in wrong array index. Also, the counterpart method - getByte had error, along with all other integer getters. In case of binary data they tried to read it as a string and convert to string as integer, and thus returning wrong values

          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.