]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Eliminate large stack buffer in doTunnelSendAll
authorLaine Stump <laine@laine.org>
Mon, 8 Mar 2010 14:01:52 +0000 (15:01 +0100)
committerDaniel Veillard <veillard@redhat.com>
Mon, 8 Mar 2010 14:01:52 +0000 (15:01 +0100)
commitecb5cf7cb25d176863c1e426ec5cff1caf31f2cb
tree63ff9d1147cd039a75f396fccbaed70d79bd6155
parent2e56fb2bccd4923abbe7e7a47ae6aceedf3aefa8
Eliminate large stack buffer in doTunnelSendAll

doTunnelSendAll function (used by QEMU migration) uses a 64k buffer on
the stack, which could be problematic. This patch replaces that with a
buffer from the heap.

While in the neighborhood, this patch also improves error reporting in
the case that saferead fails - previously, virStreamAbort() was called
(resetting errno) before reporting the error. It's been changed to
report the error first.

* src/qemu/qemu_driver.c: fix doTunnelSendAll() to use a malloc'ed
  buffer
src/qemu/qemu_driver.c