summaryrefslogtreecommitdiff
path: root/pdf/pdf_repair.c
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/pdf_repair.c')
-rw-r--r--pdf/pdf_repair.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/pdf_repair.c b/pdf/pdf_repair.c
index 83b0d814..461fd4de 100644
--- a/pdf/pdf_repair.c
+++ b/pdf/pdf_repair.c
@@ -208,7 +208,7 @@ pdf_repair_xref(pdf_xref *xref, char *buf, int bufsize)
listlen = 0;
listcap = 1024;
- list = fz_calloc(ctx, listcap, sizeof(struct entry));
+ list = fz_malloc_array(ctx, listcap, sizeof(struct entry));
/* look for '%PDF' version marker within first kilobyte of file */
n = fz_read(xref->file, (unsigned char *)buf, MAX(bufsize, 1024));
@@ -271,7 +271,7 @@ pdf_repair_xref(pdf_xref *xref, char *buf, int bufsize)
if (listlen + 1 == listcap)
{
listcap = (listcap * 3) / 2;
- list = fz_realloc(ctx, list, listcap * sizeof(struct entry));
+ list = fz_resize_array(ctx, list, listcap, sizeof(struct entry));
}
list[listlen].num = num;