View | Details | Raw Unified | Return to bug 154675
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 6-12 Link Here
6
#
6
#
7
7
8
PORTNAME=	libotf
8
PORTNAME=	libotf
9
PORTVERSION=	0.9.11
9
PORTVERSION=	0.9.12
10
CATEGORIES=	print devel
10
CATEGORIES=	print devel
11
MASTER_SITES=	http://www.m17n.org/libotf/ \
11
MASTER_SITES=	http://www.m17n.org/libotf/ \
12
		http://anthesphoria.net/FreeBSD/ports/distfiles/
12
		http://anthesphoria.net/FreeBSD/ports/distfiles/
(-)distinfo (-3 / +2 lines)
Lines 1-3 Link Here
1
MD5 (libotf-0.9.11.tar.gz) = c966e8ac1c64a01de0a66d9b9aadbb63
1
SHA256 (libotf-0.9.12.tar.gz) = a4a04cccf84955242202a4a7e50314259030c1f1573675085ba1c5a95b529297
2
SHA256 (libotf-0.9.11.tar.gz) = 34aa22564049edb154588a25c38bc044297ec6c3a5f7a76919076a32ec0f53a8
2
SIZE (libotf-0.9.12.tar.gz) = 363974
3
SIZE (libotf-0.9.11.tar.gz) = 360687
(-)files/patch-example::otfdump.c (+25 lines)
Added Link Here
1
--- example/otfdump.c	19 Mar 2010 12:27:02 -0000	1.27
2
+++ example/otfdump.c	11 Feb 2011 02:52:37 -0000	1.28
3
@@ -32,12 +32,8 @@
4
 
5
 #include <otf.h>
6
 
7
-char *indent_spaces[] =
8
-  { "", "  ", "    ", "      ", "        ", "          ", "            ",
9
-    "              ",  "                ",  "                  " };
10
-
11
 /* Indented print.  */
12
-#define IPRINT printf("\n%s", indent_spaces[indent]), printf
13
+#define IPRINT printf("\n%*s", indent * 2, ""), printf
14
 
15
 static void
16
 dump_tag (OTF_Tag tag)
17
@@ -457,6 +453,8 @@
18
 static void
19
 dump_anchor (int indent, OTF_Anchor *anchor)
20
 {
21
+  if (anchor->offset == 0)
22
+    return;
23
   IPRINT ("(Anchor (offset #x%04X) (AnchorFormat %d)",
24
 	  anchor->offset, anchor->AnchorFormat);
25
   indent++;
(-)files/patch-src::otfopen.c (+45 lines)
Added 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,

Return to bug 154675