ports/154675: [Maintainer] print/libotf: Update to 0.9.12, otfdump fix

Nikola Lecic nikola.lecic at anthesphoria.net
Fri Feb 11 08:30:08 UTC 2011


>Number:         154675
>Category:       ports
>Synopsis:       [Maintainer] print/libotf: Update to 0.9.12, otfdump fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 11 08:30:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Nikola Lecic
>Release:        FreeBSD 8.0-STABLE amd64
>Organization:
>Environment:

System: FreeBSD mordor.xx.ac.rs 8.0-STABLE FreeBSD 8.0-STABLE #0: Fri Feb 26 10:23:40 UTC 2010 nikola at mordor.xx.ac.rs:/usr/obj/usr/src/sys/GENERIC amd64

>Description:

Log:
  Update print/libotf to 0.9.12.
  Fixed otfdump crashes with some fonts, patches from Kenichi Handa <handa at m17n.org>.

A note to the committer:
  This patch adds two new files
    files/patch-example::otfdump.c
    files/patch-src::otfopen.c

>How-To-Repeat:
	
>Fix:

--- libotf-0.9.12.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/print/libotf/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile	3 May 2010 05:55:31 -0000	1.21
+++ Makefile	10 Feb 2011 14:55:27 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	libotf
-PORTVERSION=	0.9.11
+PORTVERSION=	0.9.12
 CATEGORIES=	print devel
 MASTER_SITES=	http://www.m17n.org/libotf/ \
 		http://anthesphoria.net/FreeBSD/ports/distfiles/
Index: distinfo
===================================================================
RCS file: /home/ncvs/ports/print/libotf/distinfo,v
retrieving revision 1.11
diff -u -r1.11 distinfo
--- distinfo	3 May 2010 05:55:31 -0000	1.11
+++ distinfo	9 Feb 2011 11:54:12 -0000
@@ -1,3 +1,2 @@
-MD5 (libotf-0.9.11.tar.gz) = c966e8ac1c64a01de0a66d9b9aadbb63
-SHA256 (libotf-0.9.11.tar.gz) = 34aa22564049edb154588a25c38bc044297ec6c3a5f7a76919076a32ec0f53a8
-SIZE (libotf-0.9.11.tar.gz) = 360687
+SHA256 (libotf-0.9.12.tar.gz) = a4a04cccf84955242202a4a7e50314259030c1f1573675085ba1c5a95b529297
+SIZE (libotf-0.9.12.tar.gz) = 363974
Index: files/patch-example::otfdump.c
===================================================================
RCS file: files/patch-example::otfdump.c
diff -N files/patch-example::otfdump.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-example::otfdump.c	11 Feb 2011 08:55:49 -0000
@@ -0,0 +1,25 @@
+--- example/otfdump.c	19 Mar 2010 12:27:02 -0000	1.27
++++ example/otfdump.c	11 Feb 2011 02:52:37 -0000	1.28
+@@ -32,12 +32,8 @@
+ 
+ #include <otf.h>
+ 
+-char *indent_spaces[] =
+-  { "", "  ", "    ", "      ", "        ", "          ", "            ",
+-    "              ",  "                ",  "                  " };
+-
+ /* Indented print.  */
+-#define IPRINT printf("\n%s", indent_spaces[indent]), printf
++#define IPRINT printf("\n%*s", indent * 2, ""), printf
+ 
+ static void
+ dump_tag (OTF_Tag tag)
+@@ -457,6 +453,8 @@
+ static void
+ dump_anchor (int indent, OTF_Anchor *anchor)
+ {
++  if (anchor->offset == 0)
++    return;
+   IPRINT ("(Anchor (offset #x%04X) (AnchorFormat %d)",
+ 	  anchor->offset, anchor->AnchorFormat);
+   indent++;
Index: files/patch-src::otfopen.c
===================================================================
RCS file: files/patch-src::otfopen.c
diff -N files/patch-src::otfopen.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src::otfopen.c	11 Feb 2011 08:56:34 -0000
@@ -0,0 +1,45 @@
+--- src/otfopen.c	22 Sep 2010 03:46:17 -0000	1.62
++++ src/otfopen.c	11 Feb 2011 02:55:05 -0000	1.63
+@@ -2336,8 +2336,9 @@
+     }
+   for (i = 0; i < array->Count; i++)
+     for (j = 0; j < ClassCount; j++)
+-      if (read_anchor (otf, stream, offset + array->offset,
+-		       &array->AnchorRecord[i].Anchor[j]) < 0)
++      if (array->AnchorRecord[i].Anchor[j].offset > 0
++	  && read_anchor (otf, stream, offset + array->offset,
++			  &array->AnchorRecord[i].Anchor[j]) < 0)
+ 	return -1;
+   RESTORE_STREAM (stream, state);
+   return 0;
+@@ -2437,7 +2438,7 @@
+ 		      unsigned ClassCount, OTF_LigatureAttach *attach)
+ {
+   char *errfmt = "LigatureAttach%s";
+-  int errret = 1;
++  int errret = -1;
+   int i, j;
+ 
+   SEEK_STREAM (stream, offset + attach->offset);
+@@ -2483,8 +2484,10 @@
+   for (i = 0; i < array->LigatureCount; i++)
+     READ_OFFSET (stream, array->LigatureAttach[i].offset);
+   for (i = 0; i < array->LigatureCount; i++)
+-    read_ligature_attach (otf, stream, offset + array->offset,
+-			  class_count, array->LigatureAttach + i);
++    if (array->LigatureAttach[i].offset > 0
++	&& read_ligature_attach (otf, stream, offset + array->offset,
++				 class_count, array->LigatureAttach + i) < 0)
++      return -1;
+   RESTORE_STREAM (stream, state);
+   return 0;
+ }
+@@ -2625,7 +2628,7 @@
+ 	  read_coverage (otf, stream, offset, &subtable->Coverage);
+ 	  read_coverage (otf, stream, offset,
+ 			 &subtable->u.mark_mark1.Mark2Coverage);
+-	  READ_UINT16 (stream, subtable->u.mark_base1.ClassCount);
++	  READ_UINT16 (stream, subtable->u.mark_mark1.ClassCount);
+ 	  read_mark_array (otf, stream, offset,
+ 			   &subtable->u.mark_mark1.Mark1Array);
+ 	  read_anchor_array (otf, stream, offset,
--- libotf-0.9.12.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list