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

NULL pointer dereference in partition_info::set_partition_bitmaps_from_table

    XMLWordPrintable

Details

    Description

      sql/partition_info.cc

      bool partition_info::set_partition_bitmaps_from_table(TABLE_LIST *table_list)
      {
        List<String> *partition_names= table_list ?
                                         NULL : table_list->partition_names;
        return set_partition_bitmaps(partition_names);
      }
      

      If table_list is not NULL then we assign NULL to partition_names.
      If table_list is NULL then we dereference NULL pointer in table_list->partition_names.

      Looks like the order of the ? operator results should be reversed:

      bool partition_info::set_partition_bitmaps_from_table(TABLE_LIST *table_list)
      {
        List<String> *partition_names= table_list ?
                                         table_list->partition_names : NULL;
        return set_partition_bitmaps(partition_names);
      }
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            yury.chaikou Yury Chaikou
            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.