File GraphicsMagick-CVE-2016-10052.patch of Package GraphicsMagick.7782

From 9e187b73a8a1290bb0e1a1c878f8be1917aa8742 Mon Sep 17 00:00:00 2001
From: dirk <dirk@git.imagemagick.org>
Date: Sat, 13 Aug 2016 09:06:23 +0200
Subject: [PATCH] Changed the JPEG writer to raise a warning when the exif
 profile exceeds 65533 bytes and truncate it.

---
 coders/jpeg.c      | 11 ++++++++---
 config/english.xml |  3 +++
 2 files changed, 11 insertions(+), 3 deletions(-)

Index: GraphicsMagick-1.3.21/coders/jpeg.c
===================================================================
--- GraphicsMagick-1.3.21.orig/coders/jpeg.c	2017-01-17 16:52:11.817814776 +0100
+++ GraphicsMagick-1.3.21/coders/jpeg.c	2017-01-17 16:57:51.035331092 +0100
@@ -1689,10 +1689,9 @@ static void WriteEXIFProfile(j_compress_
   size_t
     j;
 
-  for (j=0; j < profile_length; j+=65533L)
-    jpeg_write_marker(jpeg_info,JPEG_APP0+1,
-                      profile+j,(int)
-                      Min(profile_length-j,65533L));
+  jpeg_write_marker(jpeg_info,JPEG_APP0+1,
+                    profile,(int)
+                    Min(profile_length,65533L));
 }
 
 /*
openSUSE Build Service is sponsored by