]> xenbits.xensource.com Git - libvirt.git/commit
tests: Fix possible NULL derefs in virErrorTestMsgs
authorJohn Ferlan <jferlan@redhat.com>
Mon, 17 Dec 2018 12:02:26 +0000 (07:02 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 18 Dec 2018 15:12:09 +0000 (10:12 -0500)
commit44d0db011d9ff54cc63564af9d8039c89e830281
tree7a2f53170910a53dc94e7e841ac704dd97f4dfde
parentcc9e80c59368478d179ee3eb7bf8106664c56870
tests: Fix possible NULL derefs in virErrorTestMsgs

Add guards to avoid calling strchr when @err_noinfo == NULL or
calling virErrorTestMsgFormatInfoOne when @err_info == NULL as
both would fail with a NULL deref.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
tests/virerrortest.c