LVM2/lib/cache lvmcache.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-03-13 23:01:08
Modified files:
lib/cache : lvmcache.c
Log message:
Use proper size of strncpy
Avoid reading extra character if we expect to have there '\0'.
lib/cache/lvmcache.c +1 -1
@@ -1287,7 +1287,7 @@return NULL ; } -strncpy (pvid_s, pvid,sizeof (pvid_s)); +strncpy (pvid_s, pvid,sizeof (pvid_s) -1 ); pvid_s[sizeof (pvid_s) -1 ] ='\0' ; if (!(existing = info_from_pvid(pvid_s, 0)) &&