mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix memory overwrite
Transfer of build_dm_uuid() function into libdm made uuid_prefix as parameter, thus sizeof() was replaced with strlen() and room for '\0' missed. As it's only fix in current version - no whatsnew.
This commit is contained in:
parent
c81a322337
commit
6fe315d412
@ -347,7 +347,7 @@ char *dm_build_dm_uuid(struct dm_pool *mem, const char *uuid_prefix, const char
|
||||
if (!layer)
|
||||
layer = "";
|
||||
|
||||
len = strlen(uuid_prefix) + strlen(lvid) + strlen(layer) + 1;
|
||||
len = strlen(uuid_prefix) + strlen(lvid) + strlen(layer) + 2;
|
||||
|
||||
if (!(dmuuid = dm_pool_alloc(mem, len))) {
|
||||
log_error("build_dm_name: Allocation failed for %" PRIsize_t
|
||||
|
Loading…
Reference in New Issue
Block a user