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

gcc8 compile warning on string overflow in name_create_mdt

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

          [LU-12999] gcc8 compile warning on string overflow in name_create_mdt
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.12.7 [ 14793 ]
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.14.0 [ 14490 ]
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          stancheff Shaun Tancheff created issue -

          People

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

            Dates

              Created:
              Updated:
              Resolved: