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

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

          yury.chaikou Yury Chaikou created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Blocker [ 1 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          serg Sergei Golubchik made changes -
          Assignee Alexey Botchkov [ holyfoot ]
          holyfoot Alexey Botchkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          Component/s Server [ 13907 ]
          Fix Version/s 10.6.15 [ 29013 ]
          Fix Version/s 10.9.8 [ 29015 ]
          Fix Version/s 10.10.6 [ 29017 ]
          Fix Version/s 10.8.8 [ 28518 ]
          Fix Version/s 10.6 [ 24028 ]
          Fix Version/s 10.9 [ 26905 ]
          Fix Version/s 10.10 [ 27530 ]
          Fix Version/s 10.11 [ 27614 ]
          Fix Version/s 11.0 [ 28320 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]

          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.