Blame SOURCES/libjpeg-turbo12-CVE-2018-11212.patch

39ca88
From 7dab681ec8e28c3174d00729b76f109e91e408f9 Mon Sep 17 00:00:00 2001
39ca88
From: Frank Bossen <frank@bossentech.com>
39ca88
Date: Mon, 29 Dec 2014 18:38:36 +0100
39ca88
Subject: [PATCH 1/3] Check image size when reading targa file
39ca88
39ca88
Throw an error when image width or height is 0.
39ca88
39ca88
Fixes mozilla/mozjpeg#140, closes #7.
39ca88
---
39ca88
 rdtarga.c | 3 ++-
39ca88
 1 file changed, 2 insertions(+), 1 deletion(-)
39ca88
39ca88
diff --git a/rdtarga.c b/rdtarga.c
39ca88
index 4c2cd26..d305f1f 100644
39ca88
--- a/rdtarga.c
39ca88
+++ b/rdtarga.c
39ca88
@@ -363,7 +363,8 @@ start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo)
39ca88
   if (cmaptype > 1 ||		/* cmaptype must be 0 or 1 */
39ca88
       source->pixel_size < 1 || source->pixel_size > 4 ||
39ca88
       (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */
39ca88
-      interlace_type != 0)	/* currently don't allow interlaced image */
39ca88
+      interlace_type != 0 ||		/* currently don't allow interlaced image */
39ca88
+      width == 0 || height == 0)	/* image width/height must be non-zero */
39ca88
     ERREXIT(cinfo, JERR_TGA_BADPARMS);
39ca88
   
39ca88
   if (subtype > 8) {
39ca88
-- 
39ca88
2.17.2
39ca88