diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-13 21:18:34 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-13 21:18:34 +0000 |
commit | 9ccaed06546b9ca260b29707fbd3327c3af9314d (patch) | |
tree | 4fd23fa85a7e8b461f45328e8c113d4fa67d500f /cbz | |
parent | 3212863288c4ad6396482b8fdb14db2af27c123f (diff) | |
download | mupdf-9ccaed06546b9ca260b29707fbd3327c3af9314d.tar.xz |
Fix for potential problems on allocation failure.
Taken from Sumatra.patch - many thanks.
Diffstat (limited to 'cbz')
-rw-r--r-- | cbz/mucbz.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cbz/mucbz.c b/cbz/mucbz.c index 08f21bb6..0050af29 100644 --- a/cbz/mucbz.c +++ b/cbz/mucbz.c @@ -203,8 +203,8 @@ cbz_read_zip_dir_imp(cbz_document *doc, int startoffset) (void) getlong(file); /* size of central directory */ offset = getlong(file); /* offset to central directory */ + doc->entry = fz_calloc(ctx, count, sizeof(cbz_entry)); doc->entry_count = count; - doc->entry = fz_malloc_array(ctx, count, sizeof(cbz_entry)); fz_seek(file, offset, 0); |