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

index f7d694d..dbce8da 100644 (file)
--- a/src/xml.c
+++ b/src/xml.c
@@ -1425,6 +1425,9 @@ wimlib_set_image_property(WIMStruct *wim, int image, const tchar *property_name,
        const xmlChar *name;
        int ret;
 
+       if (!property_name || !*property_name)
+               return WIMLIB_ERR_INVALID_PARAM;
+
        ret = tstr_get_utf8(property_name, &name);
        if (ret)
                return ret;