summaryrefslogtreecommitdiff
path: root/graphics/freetype2/patches/patch-ah
blob: 3422ce8e90aa8117489f097c3ef23baade81b127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-ah,v 1.1.2.1 2006/06/06 07:51:29 snj Exp $

--- src/cff/cffload.c.orig	2005-05-06 07:49:46.000000000 +0200
+++ src/cff/cffload.c	2006-06-05 23:34:29.000000000 +0200
@@ -1235,7 +1235,7 @@
       }
 
       /* access element */
-      if ( off1 )
+      if ( off1 && off2 > off1 )
       {
         *pbyte_len = off2 - off1;
 
@@ -1688,6 +1688,8 @@
 
       for ( i = 0; i < num_glyphs; i++ )
         charset->cids[charset->sids[i]] = (FT_UShort)i;
+
+      charset->max_cid = max_cid;
     }
 
   Exit:
@@ -2042,6 +2044,9 @@
         goto Exit;
     }
 
+    /* ensure that 'num_blue_values' is even */
+    priv->num_blue_values &= ~1;
+
     /* read the local subrs, if any */
     if ( priv->local_subrs_offset )
     {