From 44bf342005484e69eb9f8944b8d11f1885316ec7 Mon Sep 17 00:00:00 2001 From: Greg Lewis Date: Tue, 1 Aug 2006 18:38:25 +0000 Subject: . Fix a segfault caused by fonts with illegal glyph names or glyph names which begin with an underscore (although the patch doesn't handle these). . Bump PORTREVISION. Submitted by: Kurt Miller --- java/jdk16/files/patch-j2se::font::t1.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 java/jdk16/files/patch-j2se::font::t1.c (limited to 'java/jdk16/files/patch-j2se::font::t1.c') diff --git a/java/jdk16/files/patch-j2se::font::t1.c b/java/jdk16/files/patch-j2se::font::t1.c new file mode 100644 index 000000000000..7cb654bf7ff0 --- /dev/null +++ b/java/jdk16/files/patch-j2se::font::t1.c @@ -0,0 +1,17 @@ +$FreeBSD$ + +--- ../../j2se/src/share/native/sun/font/t2k/t1.c.orig Tue Oct 19 15:00:39 2004 ++++ ../../j2se/src/share/native/sun/font/t2k/t1.c Tue Jul 18 21:42:18 2006 +@@ -2035,9 +2035,10 @@ + + if ( firstChar >= 'A' && firstChar <= 'Z' ) + lookupIndex = firstChar - 'A'; +- else ++ else if ( firstChar >= 'a' && firstChar <= 'z' ) + lookupIndex = firstChar - 'a' + 26; +- ++ else /* underscore is also valid but not handled */ ++ return 0; + + startIndex = PSNAME_START_INDEX[ lookupIndex ]; + endIndex = PSNAME_START_INDEX[ lookupIndex + 1 ]; -- cgit v1.2.3