From 130b09a8d787dd9ff0e00281052a8dacee272d5a Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 18 Oct 2015 19:39:28 -0500 Subject: [PATCH] wimlib_set_image_property(): forbid NULL or empty property names --- src/xml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xml.c b/src/xml.c index f7d694d0..dbce8da6 100644 --- 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; -- 2.43.0