Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15834

The code in TABLE_SHARE::init_from_binary_frm_image() is not safe

    XMLWordPrintable

Details

    Description

      The code in TABLE_SHARE::init_from_binary_frm_image() is not safe for broken FRM files.

      In debug mode it can crash on assert.
      In release mode its behavior is not predictable.

      interval_nr=  (uint) strpos[12];
      ...
      DBUG_ASSERT(interval_nr); // Expect non-null expression
      ...
      vcol_info_length= interval_nr;
      vcol_expr_length= vcol_info_length -
                                (uint)(FRM_VCOL_OLD_HEADER_SIZE(opt_interval_id));
      ...
      
      

      The same problem presents in the branch for MYSQL57_GENERATED_FIELD (since 10.2), it's reported as a separate issue MDEV-16518.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.