[libvirt] [PATCH 05/10] Fix crash on OOM in qemuAddRBDHost
Peter Krempa
pkrempa at redhat.com
Mon Sep 23 16:37:00 UTC 2013
On 09/23/13 15:23, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> When parsing the RBD hosts, it increments the 'nhosts' counter
> before increasing the 'hosts' array allocation. If an OOM then
> occurs when increasing the array allocation, the cleanup block
> will attempt to access beyond the end of the array. Switch
> to using VIR_EXPAND_N instead of VIR_REALLOC_N to protect against
> this mistake
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/qemu/qemu_command.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
ACK.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130923/e44449c5/attachment-0001.sig>
More information about the libvir-list
mailing list