mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
lvmcache: copy just 32bytes
Copy only bytes which fits. vginfo->vgid is [ID_LEN + 1] vgsummary->vgid has only [ID_LEN] Reported by Coverity.
This commit is contained in:
parent
87578b5d94
commit
bf5cb4af8e
@ -1,5 +1,6 @@
|
||||
Version 2.02.120 -
|
||||
===============================
|
||||
Fix storing of vgid when caching metadata (2.02.118).
|
||||
Fix recursive lvm-config man page. (2.02.119)
|
||||
Refactor polldaemon interfaces to poll every operation by VG/LV couple
|
||||
Skip wait after testing in _wait_for_single_lv when polling finished
|
||||
|
3
lib/cache/lvmcache.c
vendored
3
lib/cache/lvmcache.c
vendored
@ -2233,7 +2233,8 @@ int lvmcache_lookup_mda(struct lvmcache_vgsummary *vgsummary)
|
||||
vgsummary->vgname = vginfo->vgname;
|
||||
vgsummary->creation_host = vginfo->creation_host;
|
||||
vgsummary->vgstatus = vginfo->status;
|
||||
memcpy((char *)&vgsummary->vgid, vginfo->vgid, sizeof(vginfo->vgid));
|
||||
/* vginfo->vgid has 1 extra byte then vgsummary->vgid */
|
||||
memcpy(&vgsummary->vgid, vginfo->vgid, sizeof(vgsummary->vgid));
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user