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

Segmentation fault in SQLFetch

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.15
    • Fix Version/s: 3.1.16
    • Component/s: General
    • Labels:
      None
    • Environment:
      Debian 11 amd64 and arm64

      Description

      SQLFetch crashes when target buffer was set to a null buffer to get column data length as SQL_C_WCHAR

      Crash occurres in ma_statement.c on line 1914 when

      *(char*)Stmt->result[i].buffer != '\0'
      

      gets dereferenced and buffer is a null pointer.

      Attached are a test that currently crashes and a patch file that adds a NULL check

        Attachments

          Activity

            People

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            pbraun Patrick Braun
            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.