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

Ensure pool name is null terminated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      strncpy is frequently used to copy pool name in utils.
      It is defined as an array of size [LOV_MAXPOOLNAME + 1 ] so we can either use the two step process of strncpy() + manually force a terminating nul character or we can use a strncpy replacement of which snprintf() is the most portable.

      Other preferred replacements such as strlcpy() or strscpy() are not widely available or require extra libraries which may not be available.

      Migrate the inconsistent strncpy() user to use snprintf() so future any updates are likely to do the right thing.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: