8005191: [parfait] #384 sun/font/layout/LookupProcessor.cpp Null pointer dereference
Reviewed-by: prr, vadim
Contributed-by: jia-hong.chen@oracle.com
--- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp Thu Feb 14 14:14:38 2013 -0800
+++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp Mon Feb 18 14:04:00 2013 -0800
@@ -125,6 +125,10 @@
}
const LookupTable *lookupTable = lookupListTable->getLookupTable(lookupTableIndex);
+ if (lookupTable == NULL) {
+ success = LE_INTERNAL_ERROR;
+ return 0;
+ }
le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
GlyphIterator tempIterator(*glyphIterator, lookupFlags);
le_uint32 delta = applyLookupTable(lookupTable, &tempIterator, fontInstance, success);