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

error: ‘strncpy’ specified bound depends on the length of the source argument

    XMLWordPrintable

Details

    • 3
    • 9223372036854775807

    Description

      While building Lustre against kernel 4.19.67 on Debian 10, I hit the following failure:

      liblnetconfig.c: In function ‘lustre_lnet_parse_nids’:
      liblnetconfig.c:320:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
         strncpy(entry, cur, len - 1);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      liblnetconfig.c:310:10: note: length computed here
          len = strlen(cur) + 1;
                ^~~~~~~~~~~
      cc1: all warnings being treated as errors
      

      Attachments

        Activity

          People

            yujian Jian Yu
            yujian Jian Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: