From e8329de2c008b5ebdbfc9a466bfe556dced36b1c Mon Sep 17 00:00:00 2001 From: kurt Date: Fri, 28 Jul 2006 13:18:45 +0000 Subject: [PATCH] Prevent the jvm from crashing when it encounters a font with an illegal glyph name (like in x11/freefonts). Problem reported by Jan Zach. --- devel/jdk/1.5/Makefile | 6 +++--- ...patch-j2se_src_share_native_sun_font_t2k_t1_c | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 devel/jdk/1.5/patches/patch-j2se_src_share_native_sun_font_t2k_t1_c diff --git a/devel/jdk/1.5/Makefile b/devel/jdk/1.5/Makefile index 00d52258d2a..ce6d19ac48b 100644 --- a/devel/jdk/1.5/Makefile +++ b/devel/jdk/1.5/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.22 2006/07/10 13:17:39 kurt Exp $ +# $OpenBSD: Makefile,v 1.23 2006/07/28 13:18:45 kurt Exp $ ONLY_FOR_ARCHS= amd64 i386 @@ -6,8 +6,8 @@ COMMENT= "Java2(TM) Standard Edition Dev Kit v${V}" COMMENT-jre= "Java2(TM) Standard Edition Runtime Environment v${V}" V= 1.5.0 DISTNAME= jdk-1_5_0 -PKGNAME= jdk-${V}p18 -PKGNAME-jre= jre-${V}p18 +PKGNAME= jdk-${V}p19 +PKGNAME-jre= jre-${V}p19 CATEGORIES= devel/jdk java diff --git a/devel/jdk/1.5/patches/patch-j2se_src_share_native_sun_font_t2k_t1_c b/devel/jdk/1.5/patches/patch-j2se_src_share_native_sun_font_t2k_t1_c new file mode 100644 index 00000000000..6f5cd74570e --- /dev/null +++ b/devel/jdk/1.5/patches/patch-j2se_src_share_native_sun_font_t2k_t1_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-j2se_src_share_native_sun_font_t2k_t1_c,v 1.1 2006/07/28 13:18:45 kurt Exp $ +--- j2se/src/share/native/sun/font/t2k/t1.c.orig Tue Jul 18 16:07:09 2006 ++++ j2se/src/share/native/sun/font/t2k/t1.c Tue Jul 18 16:32:28 2006 +@@ -2035,9 +2035,10 @@ static int PSNameToUnicode( char *PSName + + 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 ];