muxread: fix out of bounds read

ChunkVerifyAndAssign() expects to have at least 8 bytes to work with,
but was only checking for the presence of 4.

Change-Id: I8456b15d872de24a90c1e8fbfba463391ced5c7f
This commit is contained in:
James Zern 2014-06-17 19:50:12 +00:00
parent 8b0f6a4802
commit 6e93317f5b

View File

@ -57,7 +57,7 @@ static WebPMuxError ChunkVerifyAndAssign(WebPChunk* chunk,
WebPData chunk_data;
// Sanity checks.
if (data_size < TAG_SIZE) return WEBP_MUX_NOT_ENOUGH_DATA;
if (data_size < CHUNK_HEADER_SIZE) return WEBP_MUX_NOT_ENOUGH_DATA;
chunk_size = GetLE32(data + TAG_SIZE);
{