~ubuntu-branches/ubuntu/trusty/freetype/trusty-updates

« back to all changes in this revision

Viewing changes to debian/patches-freetype/CVE-2012-1140.patch

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-08-03 13:57:01 UTC
  • mfrom: (1.2.1) (34.2.7 sid)
  • Revision ID: package-import@ubuntu.com-20120803135701-ird6b33po0ygwadl
Tags: 2.4.10-0ubuntu1
* New upstream version
* debian/libfreetype6.symbols:
  - new version update
* debian/patches-freetype/savannah-bug-35847.patch,
  debian/patches-freetype/savannah-bug-35833.patch:
  - dropped, the fixes are in the new version
* Resynchronize on Debian, remaining diff:
* debian/patches-freetype/revert_scalable_fonts_metric.patch:
  - revert commit "Fix metrics on size request for scalable fonts.",
    it's breaking gtk underlining markups and creating some other 
    issues as well (lp: #972223)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Fix incorrect boundary checks
2
 
Origin: upstream, http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=292144b44a15c1a72f2ef76475d65b7a3a3fba67
3
 
 
4
 
Index: freetype-2.4.8/src/psaux/psconv.c
5
 
===================================================================
6
 
--- freetype-2.4.8.orig/src/psaux/psconv.c      2009-07-31 11:45:18.000000000 -0500
7
 
+++ freetype-2.4.8/src/psaux/psconv.c   2012-03-20 15:48:13.296374827 -0500
8
 
@@ -79,7 +79,7 @@
9
 
     FT_Bool   sign = 0;
10
 
 
11
 
 
12
 
-    if ( p == limit || base < 2 || base > 36 )
13
 
+    if ( p >= limit || base < 2 || base > 36 )
14
 
       return 0;
15
 
 
16
 
     if ( *p == '-' || *p == '+' )
17
 
@@ -150,7 +150,7 @@
18
 
     FT_Bool   sign = 0;
19
 
 
20
 
 
21
 
-    if ( p == limit )
22
 
+    if ( p >= limit )
23
 
       return 0;
24
 
 
25
 
     if ( *p == '-' || *p == '+' )
26
 
@@ -346,7 +346,11 @@
27
 
 
28
 
 #if 1
29
 
 
30
 
-    p  = *cursor;
31
 
+    p = *cursor;
32
 
+
33
 
+    if ( p >= limit )
34
 
+      return 0;
35
 
+
36
 
     if ( n > (FT_UInt)( limit - p ) )
37
 
       n = (FT_UInt)( limit - p );
38
 
 
39
 
@@ -434,6 +438,10 @@
40
 
 #if 1
41
 
 
42
 
     p = *cursor;
43
 
+
44
 
+    if ( p >= limit )
45
 
+      return 0;
46
 
+
47
 
     if ( n > (FT_UInt)(limit - p) )
48
 
       n = (FT_UInt)(limit - p);
49