changeset 7853:4b11045a9c4c

8005191: [parfait] #384 sun/font/layout/LookupProcessor.cpp Null pointer dereference Reviewed-by: prr, vadim Contributed-by: jia-hong.chen@oracle.com
author jgodinez
date Mon, 18 Feb 2013 14:04:00 -0800
parents f6eb212081b2
children 41008f5cef1a
files src/share/native/sun/font/layout/LookupProcessor.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/font/layout/LookupProcessor.cpp	Thu Feb 14 14:14:38 2013 -0800
+++ b/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);