1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +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:
Zdenek Kabelac 2011-09-14 16:07:07 +00:00
parent c81a322337
commit 6fe315d412

View File

@ -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