summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bplist.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index c1f6007..640a5c0 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -368,6 +368,11 @@ static plist_t parse_unicode_node(const char **bnode, uint64_t size)
368 368
369 data->type = PLIST_STRING; 369 data->type = PLIST_STRING;
370 unicodestr = (uint16_t*) malloc(sizeof(uint16_t) * size); 370 unicodestr = (uint16_t*) malloc(sizeof(uint16_t) * size);
371 if (!unicodestr) {
372 plist_free_data(data);
373 PLIST_BIN_ERR("%s: Could not allocate %" PRIu64 " bytes\n", __func__, sizeof(uint16_t) * size);
374 return NULL;
375 }
371 for (i = 0; i < size; i++) 376 for (i = 0; i < size; i++)
372 unicodestr[i] = be16toh(((uint16_t*)*bnode)[i]); 377 unicodestr[i] = be16toh(((uint16_t*)*bnode)[i]);
373 378