Make virStringArrayHasString return false when called on a non-existent string array. --- src/util/virstring.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/virstring.c b/src/util/virstring.c index 1f4850e..d11db5c 100644 --- a/src/util/virstring.c +++ b/src/util/virstring.c @@ -172,6 +172,9 @@ virStringArrayHasString(char **strings, const char *needle) { size_t i = 0; + if (!strings) + return false; + while (strings[i]) { if (STREQ(strings[i++], needle)) return true; -- 1.8.3.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list