Skip to content

Commit 8c460b0

Browse files
YaaZprrace
authored andcommittedJun 5, 2022
8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative
Reviewed-by: prr
1 parent 3df4b03 commit 8c460b0

File tree

1 file changed

+3
-0
lines changed
  • src/java.desktop/macosx/native/libawt_lwawt/font

1 file changed

+3
-0
lines changed
 

‎src/java.desktop/macosx/native/libawt_lwawt/font/AWTFont.m

+3
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,9 @@ static OSStatus CreateFSRef(FSRef *myFSRefPtr, NSString *inPath)
379379
CTFontRef ctfont = (CTFontRef)nsFont;
380380
CFArrayRef tagsArray =
381381
CTFontCopyAvailableTables(ctfont, kCTFontTableOptionNoOptions);
382+
if (tagsArray == NULL) {
383+
return NULL;
384+
}
382385
CFIndex numTags = CFArrayGetCount(tagsArray);
383386
for (i=0; i<numTags; i++) {
384387
if (tag ==

0 commit comments

Comments
 (0)
Please sign in to comment.