libmultipath: Fix overflow in sysfs_get_str()
authorHannes Reinecke <hare@suse.de>
Tue, 17 Dec 2013 07:04:08 +0000 (08:04 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 17 Dec 2013 21:32:12 +0000 (22:32 +0100)
commite5813a1582805403ff0a6ab1559f49da4f6e105d
tree2d6fb3703505e018b453ddb199148b9efba55a09
parent4e41e5a20465729041c3fc6b5e613d21f1a782cc
libmultipath: Fix overflow in sysfs_get_str()

sysfs_get_str() should first do a strchop() before comparing the
returned string length with the provided buffer. Otherwise we might
incur a false positive as the overflowing bits might be occupied
by spaces, which will be removed later on.

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/discovery.c