From c499ab911db8afefa197988c796331697c06219b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 22 Jan 2016 06:50:38 -0500 Subject: fontsrv: do not try to look up surrogate pairs Change-Id: Ib0a680e123ba02b41e1029e356543c24e8b4647e Reviewed-on: https://plan9port-review.googlesource.com/1430 Reviewed-by: Russ Cox --- src/cmd/fontsrv/osx.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cmd/fontsrv') diff --git a/src/cmd/fontsrv/osx.c b/src/cmd/fontsrv/osx.c index 2c88fd55..d1a31837 100644 --- a/src/cmd/fontsrv/osx.c +++ b/src/cmd/fontsrv/osx.c @@ -26,6 +26,8 @@ mapUnicode(int i) case '`': return 0x2018; } + if(0xd800 <= i && i < 0xe0000) // surrogate pairs, will crash OS X libraries! + return 0xfffd; return i; } -- cgit v1.2.3