diff options
| author | Daniel Sabogal <dsabogalcc@gmail.com> | 2016-09-06 11:38:47 -0400 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-09-08 19:08:39 +0000 |
| commit | ad14b14402712f7284e4f45b09069d9925745344 (patch) | |
| tree | 64c5daef0c0a38b588806eae3114d9f7570d9fd3 /testing/mupdf/CVE-2016-6525.patch | |
| parent | 46e1c19e777afd07f17f4b0008e7a7e3b6cb8c6e (diff) | |
| download | aports-ad14b14402712f7284e4f45b09069d9925745344.tar.bz2 aports-ad14b14402712f7284e4f45b09069d9925745344.tar.xz | |
testing/mupdf: fix for CVE-2016-6265 and CVE-2016-6525
Diffstat (limited to 'testing/mupdf/CVE-2016-6525.patch')
| -rw-r--r-- | testing/mupdf/CVE-2016-6525.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/mupdf/CVE-2016-6525.patch b/testing/mupdf/CVE-2016-6525.patch new file mode 100644 index 0000000000..003d86bfc4 --- /dev/null +++ b/testing/mupdf/CVE-2016-6525.patch @@ -0,0 +1,23 @@ +From: Sebastian Rasmussen <sebras@gmail.com> +Date: Wed, 27 Jul 2016 14:19:39 +0000 (+0800) +Subject: Make sure that number of colors in mesh params is valid. +X-Git-Url: http://git.ghostscript.com/?p=mupdf.git;a=commitdiff_plain;h=39b0f07dd960f34e7e6bf230ffc3d87c41ef0f2e;hp=fa1936405b6a84e5c9bb440912c23d532772f958 + +Make sure that number of colors in mesh params is valid. + +Fixes bug 696954. +--- + +diff --git a/source/pdf/pdf-shade.c b/source/pdf/pdf-shade.c +index 7815b3c..6e25efa 100644 +--- a/source/pdf/pdf-shade.c ++++ b/source/pdf/pdf-shade.c +@@ -206,7 +206,7 @@ pdf_load_mesh_params(fz_context *ctx, pdf_document *doc, fz_shade *shade, pdf_ob + obj = pdf_dict_get(ctx, dict, PDF_NAME_Decode); + if (pdf_array_len(ctx, obj) >= 6) + { +- n = (pdf_array_len(ctx, obj) - 4) / 2; ++ n = fz_mini(FZ_MAX_COLORS, (pdf_array_len(ctx, obj) - 4) / 2); + shade->u.m.x0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 0)); + shade->u.m.x1 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 1)); + shade->u.m.y0 = pdf_to_real(ctx, pdf_array_get(ctx, obj, 2)); |
