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

mysql_stmt_fetch_column function will coredump if bind[0].length ptr is NULL.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.3.0, 2.3.1
    • 3.0.1, 2.3.2
    • None
    • None

    Description

      in mysql_stmt_fetch_column function have follow code

          if (bind[0].length)
            *bind[0].length= stmt->bind[column].length_value;
          else
            *bind[0].length= *stmt->bind[column].length;
      

      if bind[0].length ptr is NULL, else branch will coredump

      The right code maybe

          if (bind[0].length)
            *bind[0].length= *stmt->bind[column].length;
          else
            bind[0].length= &stmt->bind[column].length_value;
      

      Attachments

        Activity

          People

            georg Georg Richter
            shuianle shuianle
            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.