[Libvirt-cim] [PATCH] Fixing NullPointerException
Chip Vincent
cvincent at linux.vnet.ibm.com
Tue Mar 8 16:43:06 UTC 2011
+1
On 03/08/2011 06:51 AM, Sharad Mishra wrote:
> # HG changeset patch
> # User Sharad Mishra<snmishra at us.ibm.com>
> # Date 1299548081 28800
> # Node ID eea958fbf1d965bc1053850f59df4005e64093ac
> # Parent 32ec4dfd813c449501f70e2419cd6f17eee5c673
> Fixing NullPointerException
>
> While reading the output of lldptool command the read buffer was going beyond the allocated size and was reading garbage. Added a check to make sure it doesn't go beyond the allocated size.
>
> Signed-off-by: Sharad Mishra<snmishra at us.ibm.com>
>
> diff -r 32ec4dfd813c -r eea958fbf1d9 src/Virt_SwitchService.c
> --- a/src/Virt_SwitchService.c Wed Mar 02 10:09:34 2011 -0800
> +++ b/src/Virt_SwitchService.c Mon Mar 07 17:34:41 2011 -0800
> @@ -48,7 +48,8 @@
> const char *searchStr[] = {" supported forwarding mode: "
> "(0x40) reflective relay",
> " supported capabilities: "
> - "(0x07) RTE ECP VDP"};
> + "(0x07) RTE ECP VDP",
> + NULL};
> int matched = 0;
>
> // Run lldptool command to find vsi support.
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list