]> git.ipfire.org Git - thirdparty/libvirt.git/commit
node_device_driver.c: don't write beyond EOB for 4K-byte symlink
authorJim Meyering <meyering@redhat.com>
Mon, 14 Dec 2009 11:05:38 +0000 (12:05 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 14 Dec 2009 15:26:38 +0000 (16:26 +0100)
commitb1483189811c6980945731f54837c765d61ea5d0
tree40cdd7d4edb04f4414989385d972c927db4d71e4
parent042956d558ff319561371133ac98f6b9913b7229
node_device_driver.c: don't write beyond EOB for 4K-byte symlink

* src/node_device/node_device_driver.c (update_driver_name): The
previous code would write one byte beyond the end of the 4KiB
stack buffer when presented with a symlink value of exactly that
length (very unlikely).  Remove the automatic buffer and use
virFileResolveLink in place of readlink.  Suggested by Daniel Veillard.
src/node_device/node_device_driver.c