]> sourceware.org Git - lvm2.git/commit
Check target type name for DM_MAX_TYPE_NAME length
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Nov 2011 19:34:02 +0000 (19:34 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Nov 2011 19:34:02 +0000 (19:34 +0000)
commit108cfe0b0bae24c9378a447145c31fe27694235d
tree16cd6219f9bc633a6f7b567c04cccfa2347c8652
parentf8484c44cc8f210a62b047d06a9c8b3c35de7a80
Check target type name for DM_MAX_TYPE_NAME length

Avoid creation of target type name when it's longer then
DM_MAX_TYPE_NAME (noticed by static analyzer where the
sp.target_type might be missing '\0' at the end.)

Before patch:

$> dmsetup create long
0 1000 looooooooooooooooooooooooooong
^D
device-mapper: reload ioctl failed: Invalid argument

After patch:

$> dmsetup create xxx
0 1000 looooooooooooooooooooooooooong
Target type name looooooooooooooooooooooooooong is too long.
Command failed
WHATS_NEW_DM
libdm/ioctl/libdm-iface.c
libdm/libdm-common.c
This page took 0.037604 seconds and 5 git commands to generate.