SeekHead::Parse(): fix assertion failure

replace assertions with failure returns

BUG=23430787
BUG=23431751

Change-Id: I22f000388cf040d064ba898c5de3658b56a3dfea
This commit is contained in:
James Zern
2015-08-21 17:01:32 -07:00
parent d9bdadeff8
commit fa2aa7da2d

View File

@@ -1453,10 +1453,13 @@ long SeekHead::Parse() {
++void_element_count; ++void_element_count;
pos += size; // consume payload pos += size; // consume payload
assert(pos <= stop);
if (pos > stop)
return E_FILE_FORMAT_INVALID;
} }
assert(pos == stop); if (pos != stop)
return E_FILE_FORMAT_INVALID;
m_entries = new (std::nothrow) Entry[entry_count]; m_entries = new (std::nothrow) Entry[entry_count];