8223886: Add in font table referene
Reviewed-by: serb, psadhukhan, mschoene, rhalade
--- a/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Tue May 21 13:02:22 2019 -0700
+++ b/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc Wed May 22 08:42:11 2019 -0700
@@ -351,6 +351,9 @@
}
length = env->GetArrayLength(tableBytes);
buffer = calloc(length, sizeof(jbyte));
+ if (buffer == NULL) {
+ return NULL;
+ }
env->GetByteArrayRegion(tableBytes, 0, length, (jbyte*)buffer);
return hb_blob_create((const char *)buffer, length,