Uploaded image for project: 'MariaDB Connector/Python'
  1. MariaDB Connector/Python
  2. CONPY-401

Support for STMT_ATTR_CB_RESULT_EX callback

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 1.1
    • None
    • None
    • None

    Description

      Connector/Python currently registers field_fetch_callback via STMT_ATTR_CB_RESULT. The callback receives only a pointer into the raw row (unsigned char **row) and no end-of-buffer pointer, so it cannot verify that the data it parses is within bounds. Length-encoded values, fixed-size reads and temporal values are all trusted as sent by the server. With a truncated or malformed row, the callback can read past the end of the buffer.

      Once C/C provides STMT_ATTR_CB_RESULT_EX (callback with end pointer and an error return), Connector/Python should use it with full bounds checking. If the library does not support the new attribute, Connector/Python must not use the old callback and should fetch results through the standard bind-buffer path.

      Attachments

        Issue Links

          Activity

            People

              georg Georg Richter
              georg Georg Richter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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