Details
-
Bug
-
Resolution: Fixed
-
Minor
-
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.