mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
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:
parent
8b0f6a4802
commit
6e93317f5b
@ -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);
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user