SHA256
1
0
forked from pool/mupdf
mupdf/CVE-2016-8728.patch
Ismail Dönmez 1369417c55 - Add CVE-2016-10221.patch, CVE-2016-8728.patch and
CVE-2017-7976.patch to fix CVE-2016-10221, CVE-2016-8728,
  CVE-2016-8729 and CVE-2017-7976
  bsc#1032140 bsc#1039850 bsc#1052029

OBS-URL: https://build.opensuse.org/package/show/Publishing/mupdf?expand=0&rev=56
2017-08-03 08:30:44 +00:00

32 lines
1.2 KiB
Diff

Index: mupdf-1.10a-source/source/fitz/draw-scale-simple.c
===================================================================
--- mupdf-1.10a-source.orig/source/fitz/draw-scale-simple.c
+++ mupdf-1.10a-source/source/fitz/draw-scale-simple.c
@@ -1294,7 +1294,7 @@ scale_single_row(unsigned char * restric
tmp[j] = 128;
if (weights->flip)
{
- dst += (weights->count-1)*n;
+ dst += (weights->count-1)*nf;
for (i=weights->count; i > 0; i--)
{
min = *contrib++;
Index: mupdf-1.10a-source/thirdparty/jbig2dec/jbig2_image.c
===================================================================
--- mupdf-1.10a-source.orig/thirdparty/jbig2dec/jbig2_image.c
+++ mupdf-1.10a-source/thirdparty/jbig2dec/jbig2_image.c
@@ -38,6 +38,13 @@ jbig2_image_new(Jbig2Ctx *ctx, int width
int stride;
int64_t check;
+ if (width == 0 || height == 0) {
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1,
+ "zero width (%d) or height (%d) in jbig2_image_new",
+ width, height);
+ return NULL;
+ }
+
image = jbig2_new(ctx, Jbig2Image, 1);
if (image == NULL) {
jbig2_error(ctx, JBIG2_SEVERITY_FATAL, -1, "could not allocate image structure in jbig2_image_new");