summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bplist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 0122e08..73fa4e0 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -441,6 +441,13 @@ static plist_t parse_dict_node(struct bplist_data *bplist, const char** bnode, u
plist_free(node);
return NULL;
}
+
+ if (plist_get_data(key)->type != PLIST_STRING) {
+ fprintf(stderr, "ERROR: Malformed binary plist dict, invalid node type for key!\n");
+ plist_free(node);
+ return NULL;
+ }
+
/* enforce key type */
plist_get_data(key)->type = PLIST_KEY;
if (!plist_get_data(key)->strval) {