summaryrefslogtreecommitdiff
path: root/source/xps/xps-zip.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/xps/xps-zip.c')
-rw-r--r--source/xps/xps-zip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/xps/xps-zip.c b/source/xps/xps-zip.c
index 4f524752..8b96773f 100644
--- a/source/xps/xps-zip.c
+++ b/source/xps/xps-zip.c
@@ -96,7 +96,8 @@ xps_read_part(xps_document *doc, char *partname)
/* take over the data */
data = buf->data;
- size = buf->len;
+ /* size doesn't include the added zero-terminator */
+ size = buf->len - 1;
fz_free(ctx, buf);
return xps_new_part(doc, partname, data, size);