8005191: [parfait] #384 sun/font/layout/LookupProcessor.cpp Null pointer dereference
authorjgodinez
Mon, 18 Feb 2013 14:04:00 -0800
changeset 15967 688298c47675
parent 15966 258abbf3f19f
child 15968 cd731eaecdec
8005191: [parfait] #384 sun/font/layout/LookupProcessor.cpp Null pointer dereference Reviewed-by: prr, vadim Contributed-by: jia-hong.chen@oracle.com
jdk/src/share/native/sun/font/layout/LookupProcessor.cpp
--- 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);