wimlib_get_image_property(): forbid NULL or empty property names
authorEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 00:39:27 +0000 (19:39 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 19 Oct 2015 00:48:24 +0000 (19:48 -0500)
src/xml.c

index e29030c..f7d694d 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1388,6 +1388,8 @@ wimlib_get_image_property(const WIMStruct *wim, int image,
        const xmlChar *name;
        const tchar *value;
 
+       if (!property_name || !*property_name)
+               return NULL;
        if (tstr_get_utf8(property_name, &name))
                return NULL;
        value = get_image_property(wim, image, name, NULL);