Lines 1-45
Link Here
|
1 |
--- src/otfopen.c 22 Sep 2010 03:46:17 -0000 1.62 |
|
|
2 |
+++ src/otfopen.c 11 Feb 2011 02:55:05 -0000 1.63 |
3 |
@@ -2336,8 +2336,9 @@ |
4 |
} |
5 |
for (i = 0; i < array->Count; i++) |
6 |
for (j = 0; j < ClassCount; j++) |
7 |
- if (read_anchor (otf, stream, offset + array->offset, |
8 |
- &array->AnchorRecord[i].Anchor[j]) < 0) |
9 |
+ if (array->AnchorRecord[i].Anchor[j].offset > 0 |
10 |
+ && read_anchor (otf, stream, offset + array->offset, |
11 |
+ &array->AnchorRecord[i].Anchor[j]) < 0) |
12 |
return -1; |
13 |
RESTORE_STREAM (stream, state); |
14 |
return 0; |
15 |
@@ -2437,7 +2438,7 @@ |
16 |
unsigned ClassCount, OTF_LigatureAttach *attach) |
17 |
{ |
18 |
char *errfmt = "LigatureAttach%s"; |
19 |
- int errret = 1; |
20 |
+ int errret = -1; |
21 |
int i, j; |
22 |
|
23 |
SEEK_STREAM (stream, offset + attach->offset); |
24 |
@@ -2483,8 +2484,10 @@ |
25 |
for (i = 0; i < array->LigatureCount; i++) |
26 |
READ_OFFSET (stream, array->LigatureAttach[i].offset); |
27 |
for (i = 0; i < array->LigatureCount; i++) |
28 |
- read_ligature_attach (otf, stream, offset + array->offset, |
29 |
- class_count, array->LigatureAttach + i); |
30 |
+ if (array->LigatureAttach[i].offset > 0 |
31 |
+ && read_ligature_attach (otf, stream, offset + array->offset, |
32 |
+ class_count, array->LigatureAttach + i) < 0) |
33 |
+ return -1; |
34 |
RESTORE_STREAM (stream, state); |
35 |
return 0; |
36 |
} |
37 |
@@ -2625,7 +2628,7 @@ |
38 |
read_coverage (otf, stream, offset, &subtable->Coverage); |
39 |
read_coverage (otf, stream, offset, |
40 |
&subtable->u.mark_mark1.Mark2Coverage); |
41 |
- READ_UINT16 (stream, subtable->u.mark_base1.ClassCount); |
42 |
+ READ_UINT16 (stream, subtable->u.mark_mark1.ClassCount); |
43 |
read_mark_array (otf, stream, offset, |
44 |
&subtable->u.mark_mark1.Mark1Array); |
45 |
read_anchor_array (otf, stream, offset, |