summaryrefslogtreecommitdiffstats
path: root/hw/i386/kvm/pci-assign.c
diff options
context:
space:
mode:
authorMarkus Armbruster2014-02-26 18:28:36 +0100
committerAlex Williamson2014-02-26 18:28:36 +0100
commit13665a2d2f675341e73618fcd7f9d36b6c68b509 (patch)
tree18b0db6388a85905cb0075c45e68c42331c48264 /hw/i386/kvm/pci-assign.c
parentxilinx: Delete hw/include/xilinx.h (diff)
downloadqemu-13665a2d2f675341e73618fcd7f9d36b6c68b509.tar.gz
qemu-13665a2d2f675341e73618fcd7f9d36b6c68b509.tar.xz
qemu-13665a2d2f675341e73618fcd7f9d36b6c68b509.zip
vfio: Fix overrun after readlink() fills buffer completely
readlink() returns the number of bytes written to the buffer, and it doesn't write a terminating null byte. vfio_init() writes it itself. Overruns the buffer when readlink() filled it completely. Fix by treating readlink() filling the buffer completely as error, like we do in pci-assign.c's assign_failed_examine(). Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/i386/kvm/pci-assign.c')
0 files changed, 0 insertions, 0 deletions