8223886: Add in font table referene
authorprr
Wed, 22 May 2019 08:42:11 -0700
changeset 58621 17300b6f751f
parent 58620 ca5f1bf5a054
child 58622 1b4ab3ebc51b
8223886: Add in font table referene Reviewed-by: serb, psadhukhan, mschoene, rhalade
src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
--- 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,