mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
lvmcache: fix debug trace
Recent debug tracing commit introduce read of uninitialized memory, since VGID is not really a proper string which ends with '\0'. Enforce at most 32 (ID_LEN) chars are read from vgid. (in release fix)
This commit is contained in:
parent
fc280bcc42
commit
e5382c063d
4
lib/cache/lvmcache.c
vendored
4
lib/cache/lvmcache.c
vendored
@ -446,8 +446,8 @@ struct lvmcache_vginfo *lvmcache_vginfo_from_vgname(const char *vgname, const ch
|
||||
while ((vginfo = vginfo->next));
|
||||
|
||||
if (!vginfo)
|
||||
log_debug_cache("Metadata cache has not found vgname \"%s\" with vgid \"%s\"",
|
||||
vgname, vgid);
|
||||
log_debug_cache("Metadata cache has not found vgname \"%s\" with vgid \"%."
|
||||
DM_TO_STRING(ID_LEN) "s\".", vgname, vgid ? : "");
|
||||
|
||||
return vginfo;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user