Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12999

gcc8 compile warning on string overflow in name_create_mdt

    XMLWordPrintable

Details

    • 3
    • 9223372036854775807

    Description

       

      /home/shaun/lustre-wc-rel/lustre/mgs/mgs_llog.c:1539:2: note: ‘sprintf’ output between 9 and 10 bytes into a destination of size 9
       sprintf(mdt_index, "-MDT%04x", i);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/shaun/lustre-wc-rel/lustre/mgs/mgs_llog.c:1539:30: error: ‘sprintf’ may write a terminating nul past the end of the destination [-Werror=format-overflow=]
       sprintf(mdt_index, "-MDT%04x", i);
       
      

       

      Attachments

        Activity

          People

            stancheff Shaun Tancheff
            stancheff Shaun Tancheff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: