提交 2e8c2c4e 编写于 作者: A aivanov

8145551: Test failed with Crash for Improved font lookups

Reviewed-by: prr, vadim
上级 4725752f
......@@ -44,6 +44,7 @@ LEReferenceTo<FeatureTable> FeatureListTable::getFeatureTable(const LETableRefer
featureRecordArrayRef(base, success, featureRecordArray, SWAPW(featureCount));
if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
return LEReferenceTo<FeatureTable>();
}
......
......@@ -42,6 +42,7 @@ const LEReferenceTo<LookupTable> LookupListTable::getLookupTable(const LEReferen
LEReferenceToArrayOf<Offset> lookupTableOffsetArrayRef(base, success, (const Offset*)&lookupTableOffsetArray, SWAPW(lookupCount));
if(LE_FAILURE(success) || lookupTableIndex>lookupTableOffsetArrayRef.getCount()) {
success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
return LEReferenceTo<LookupTable>();
} else {
return LEReferenceTo<LookupTable>(base, success, SWAPW(lookupTableOffsetArrayRef.getObject(lookupTableIndex, success)));
......@@ -53,6 +54,7 @@ const LEReferenceTo<LookupSubtable> LookupTable::getLookupSubtable(const LERefer
LEReferenceToArrayOf<Offset> subTableOffsetArrayRef(base, success, (const Offset*)&subTableOffsetArray, SWAPW(subTableCount));
if(LE_FAILURE(success) || subtableIndex>subTableOffsetArrayRef.getCount()) {
success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
return LEReferenceTo<LookupSubtable>();
} else {
return LEReferenceTo<LookupSubtable>(base, success, SWAPW(subTableOffsetArrayRef.getObject(subtableIndex, success)));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册