summaryrefslogtreecommitdiffstats
path: root/src/xplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xplist.c')
-rw-r--r--src/xplist.c1
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);