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

bzero wipes more bytes than necessary in set_global_from_ddl_log_entry

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL), 10.11, 11.0(EOL), 11.1(EOL)
    • 10.8.8, 10.6.15, 10.9.8, 10.10.6
    • Server
    • None

    Description

      This call of bzero in ddl_log.cc will use a wrong number of bytes to wipe: "global_ddl_log.name_pos - 18 + 16 + 8" instead of "global_ddl_log.name_pos - (18 + 16 + 8)"

      #define DDL_LOG_UUID_POS 18
      #define MY_UUID_SIZE 16
      #define DDL_LOG_ID_POS DDL_LOG_UUID_POS + MY_UUID_SIZE
      #define DDL_LOG_END_POS DDL_LOG_ID_POS + 8
      ...
        bzero(file_entry_buf+DDL_LOG_END_POS,
              global_ddl_log.name_pos - DDL_LOG_END_POS);
      

      Expressions in #defines should be wrapped in ( ).

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            yury.chaikou Yury Chaikou
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.