bug 968026 - cherrypick and rebase upstream commit a9a5f453467d1494ebf9f31cba99c2c49b37fd52 to fix potential OTS crash. r=fredw

This commit is contained in:
Jonathan Kew 2014-02-05 11:15:55 +00:00
parent ba7766a4a4
commit 34d04ccc21

View File

@ -581,7 +581,7 @@ bool ProcessGeneric(ots::OpenTypeFile *header, uint32_t signature,
const std::map<uint32_t, OpenTypeTable>::const_iterator it
= table_map.find(Tag(table_parsers[i].tag));
ots::TableAction action = GetTableAction(it->first);
ots::TableAction action = GetTableAction(Tag(table_parsers[i].tag));
if (it == table_map.end()) {
if (table_parsers[i].required && action == ots::TABLE_ACTION_SANITIZE) {
return OTS_FAILURE_MSG_TAG("missing required table", table_parsers[i].tag);