diff options
author | Nikias Bassen | 2017-02-07 03:32:32 +0100 |
---|---|---|
committer | Nikias Bassen | 2017-02-07 03:32:32 +0100 |
commit | 322b2c9dc4d50ee466c3fb1263b10282009a63cc (patch) | |
tree | a322807fe715bd9aae96ea49eabd511fe5467043 /src/xplist.c | |
parent | 234c41cd7eead5e5a68dbaa80d26335a19cd1d83 (diff) | |
download | libplist-322b2c9dc4d50ee466c3fb1263b10282009a63cc.tar.gz libplist-322b2c9dc4d50ee466c3fb1263b10282009a63cc.tar.bz2 |
xplist: unescape_entities(): Make sure text part buffer is null terminated after strncpy
Diffstat (limited to 'src/xplist.c')
-rw-r--r-- | src/xplist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/xplist.c b/src/xplist.c index ec00410..782a71c 100644 --- a/src/xplist.c +++ b/src/xplist.c @@ -783,6 +783,7 @@ static char* text_parts_get_content(text_part_t *tp, int unesc_entities, size_t while (tp && tp->begin) { size_t len = tp->length; strncpy(p, tp->begin, len); + p[len] = '\0'; if (!tp->is_cdata && unesc_entities) { if (unescape_entities(p, &len) < 0) { free(str); |