Blame SOURCES/freetype-2.4.11-CVE-2014-9664a.patch

43e195
From 73be9f9ab67842cfbec36ee99e8d2301434c84ca Mon Sep 17 00:00:00 2001
43e195
From: Werner Lemberg <wl@gnu.org>
43e195
Date: Mon, 24 Nov 2014 06:30:05 +0000
43e195
Subject: [type1, type42] Another fix for Savannah bug #43655.
43e195
43e195
* src/type1/t1load.c (parse_charstrings), src/type42/t42parse.c
43e195
(t42_parse_charstrings): Add another boundary testing.
43e195
---
43e195
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
43e195
index caa75bd..24b14a8 100644
43e195
--- a/src/type1/t1load.c
43e195
+++ b/src/type1/t1load.c
43e195
@@ -1589,6 +1589,11 @@
43e195
       }
43e195
 
43e195
       T1_Skip_PS_Token( parser );
43e195
+      if ( parser->root.cursor >= limit )
43e195
+      {
43e195
+        error = T1_Err_Invalid_File_Format;
43e195
+        goto Fail;
43e195
+      }
43e195
       if ( parser->root.error )
43e195
         return;
43e195
 
43e195
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
43e195
index daf304d..d45c069 100644
43e195
--- a/src/type42/t42parse.c
43e195
+++ b/src/type42/t42parse.c
43e195
@@ -823,6 +823,12 @@
43e195
         break;
43e195
 
43e195
       T1_Skip_PS_Token( parser );
43e195
+      if ( parser->root.cursor >= limit )
43e195
+      {
43e195
+        FT_ERROR(( "t42_parse_charstrings: out of bounds\n" ));
43e195
+        error = T42_Err_Invalid_File_Format;
43e195
+        goto Fail;
43e195
+      }
43e195
       if ( parser->root.error )
43e195
         return;
43e195
 
43e195
--
43e195
cgit v0.9.0.2