Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-3926

Potentially truncated bitmap file name in log_online_open_bitmap_file_read_only() (storage/innobase/log/log0online.cc)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.5.59-38.11, 5.6.39-83.1, 5.7.21-20
    • Component/s: None
    • Labels:

      Description

      /github/inikep-ps/storage/innobase/log/log0online.cc: In function 'ulint log_online_bitmap_iterator_init(log_bitmap_iterator_t*, lsn_t, lsn_t)':
      /github/inikep-ps/storage/innobase/log/log0online.cc:1638:1: error: '__builtin___snprintf_chk' output may be truncated before the last format character [-Werror=format-truncation=]
       log_online_bitmap_iterator_init(
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      In file included from /usr/include/stdio.h:936:0,
                       from /github/inikep-ps/include/my_global.h:309,
                       from /github/inikep-ps/storage/innobase/include/univ.i:103,
                       from /github/inikep-ps/storage/innobase/include/log0online.h:27,
                       from /github/inikep-ps/storage/innobase/log/log0online.cc:25:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:65:44: note: '__builtin___snprintf_chk' output 2 or more bytes (assuming 513) into a destination of size 512
              __bos (__s), __fmt, __va_arg_pack ());
      

      ^```
      the real line is:

              ut_snprintf(bitmap_file->name, FN_REFLEN, "%s%c%s",
                      srv_data_home, SRV_PATH_SEPARATOR, name);
      

        Attachments

          Activity

            People

            Assignee:
            przemyslaw.skibinski Przemyslaw Skibinski
            Reporter:
            przemyslaw.skibinski Przemyslaw Skibinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m

                  Smart Checklist