]> 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>
Fri, 30 Oct 2015 10:08:32 +0000 (11:08 +0100)
commit4419ffb9eff5801fdbd385a4a6199b3877f802ad
tree0f47ae7c1a4afaed7b54ba850b8312d9435570c5
parent9b28da2d1f88a99c37477ff63a23e8b9edbb1026
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