Blame SOURCES/freetype-2.4.11-CVE-2014-9670.patch

43e195
From ef1eba75187adfac750f326b563fe543dd5ff4e6 Mon Sep 17 00:00:00 2001
43e195
From: Werner Lemberg <wl@gnu.org>
43e195
Date: Thu, 06 Nov 2014 22:25:05 +0000
43e195
Subject: Fix Savannah bug #43548.
43e195
43e195
* src/pcf/pcfread (pcf_get_encodings): Add sanity checks for row and
43e195
column values.
43e195
---
43e195
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
43e195
index 8db31bd..668c962 100644
43e195
--- a/src/pcf/pcfread.c
43e195
+++ b/src/pcf/pcfread.c
43e195
@@ -812,6 +812,15 @@ THE SOFTWARE.
43e195
     if ( !PCF_FORMAT_MATCH( format, PCF_DEFAULT_FORMAT ) )
43e195
       return PCF_Err_Invalid_File_Format;
43e195
 
43e195
+    /* sanity checks */
43e195
+    if ( firstCol < 0       ||
43e195
+         firstCol > lastCol ||
43e195
+         lastCol  > 0xFF    ||
43e195
+         firstRow < 0       ||
43e195
+         firstRow > lastRow ||
43e195
+         lastRow  > 0xFF    )
43e195
+      return PCF_Err_Invalid_Table;
43e195
+
43e195
     FT_TRACE4(( "pdf_get_encodings:\n" ));
43e195
 
43e195
     FT_TRACE4(( "  firstCol %d, lastCol %d, firstRow %d, lastRow %d\n",
43e195
--
43e195
cgit v0.9.0.2