From 3cfe22475244cc1e924b6fd189234c130d6c5914 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 7 Nov 2026 12:29:06 +0100 Subject: xplist: accept a self-closing as an empty key --- src/xplist.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/xplist.c') diff --git a/src/xplist.c b/src/xplist.c index adf3f40..92ca15d 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -1405,6 +1405,17 @@ static plist_err_t node_from_xml(parse_ctx ctx, plist_t *plist) data->length = length; } } else { + if (!strcmp(tag, XPLIST_KEY) && !keyname && parent && (plist_get_node_type(parent) == PLIST_DICT)) { + keyname = strdup(""); + if (!keyname) { + PLIST_XML_ERR("failed to allocate key name\n"); + ctx->err = PLIST_ERR_NO_MEM; + goto err_out; + } + plist_free(subnode); + subnode = NULL; + continue; + } data->strval = strdup(""); data->length = 0; } -- cgit v1.1-32-gdbae