[libvirt] [PATCH 17/26] virstring: Resolve Coverity FORWARD_NULL

Peter Krempa pkrempa at redhat.com
Thu Sep 11 09:22:08 UTC 2014


On 09/05/14 00:26, John Ferlan wrote:
> Perhaps a false positive, but since Coverity doesn't understand the
> relationship between the 'count' and the 'strings', rather than leave
> the chance the on input 'strings' is NULL and causes a deref - just
> check for it and return
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/util/virstring.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Yep, false positive. All callers shall pass 0 as count if strings is NULL.

ACK, doesn't hurt.

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140911/8706b8bf/attachment-0001.sig>


More information about the libvir-list mailing list