]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/sysfs: make sysfs_get_devname()/blkid_devno_to_wholedisk() more robust
authorKarel Zak <kzak@redhat.com>
Fri, 30 Oct 2015 10:08:32 +0000 (11:08 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Nov 2015 09:26:45 +0000 (10:26 +0100)
commit4bee4ece7393b43159b38e80173bcbf3c781c2e8
treec66df8b66405f63a15d5ff300414b48471209c4c
parente6e5bbda886be638892ed6fe1e677dbb2bc03d63
lib/sysfs: make sysfs_get_devname()/blkid_devno_to_wholedisk() more robust

Now the function uses result buffer for internal stuff (readlink), so
it requires that the buffer is large enough. This is unexpected as
caller assumes that the buffer has to be large enough for devname only.

References: http://www.spinics.net/lists/util-linux-ng/msg12015.html
Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/sysfs.c