Juergen Daubert
19c238d66e
see http://www.cvedetails.com/vulnerability-list/vendor_id-10846/product_id-20840/year-2017/Artifex-Mupdf.html
27 lines
904 B
Diff
27 lines
904 B
Diff
From 0f0fbc07d9be31f5e83ec5328d7311fdfd8328b1 Mon Sep 17 00:00:00 2001
|
|
From: Tor Andersson <tor.andersson@artifex.com>
|
|
Date: Tue, 19 Sep 2017 16:33:38 +0200
|
|
Subject: [PATCH] Fix 698540: Check name, comment and meta size field signs.
|
|
|
|
---
|
|
source/fitz/unzip.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c
|
|
index f2d4f32..0bcce0f 100644
|
|
--- a/source/fitz/unzip.c
|
|
+++ b/source/fitz/unzip.c
|
|
@@ -141,6 +141,9 @@ static void read_zip_dir_imp(fz_context *ctx, fz_zip_archive *zip, int start_off
|
|
(void) fz_read_int32_le(ctx, file); /* ext file atts */
|
|
offset = fz_read_int32_le(ctx, file);
|
|
|
|
+ if (namesize < 0 || metasize < 0 || commentsize < 0)
|
|
+ fz_throw(ctx, FZ_ERROR_GENERIC, "invalid size in zip entry");
|
|
+
|
|
name = fz_malloc(ctx, namesize + 1);
|
|
n = fz_read(ctx, file, (unsigned char*)name, namesize);
|
|
if (n < (size_t)namesize)
|
|
--
|
|
2.9.1
|
|
|