]> sourceware.org Git - lvm2.git/commit
Fix allocation of system_id
authorZdenek Kabelac <zkabelac@redhat.com>
Sun, 13 Mar 2011 23:05:48 +0000 (23:05 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Sun, 13 Mar 2011 23:05:48 +0000 (23:05 +0000)
commit844b75f4d677b4ddb398798d1cb0fcc68d53bbb5
treea67dd2a4edd8a0b1624ae3ff119ce241e0e64c07
parente1cb521dd9f85bb1d4465f12edfb16bb6106e19c
Fix allocation of system_id

As code uses strncpy(system_id, NAME_LEN) and doesn't set '\0'
Fix it by always allocating NAME_LEN + 1 buffer size and with zalloc
we always get '\0' as the last byte.

This bug may trigger some unexpected behavior of the string operation
code - depends on the pool allocator.

FIXME: refactor this code to alloc_vg.
WHATS_NEW
lib/format1/import-export.c
lib/format_text/import_vsn1.c
lib/metadata/metadata.c
This page took 0.039272 seconds and 5 git commands to generate.