mirror of
https://github.com/webmproject/libwebp.git
synced 2025-04-11 03:16:48 +02:00
Merge "muxread,anmf: fail on multiple image chunks"
This commit is contained in:
commit
29fb8562c6
@ -138,6 +138,7 @@ static int MuxImageParse(const WebPChunk* const chunk, int copy_data,
|
|||||||
wpi->is_partial_ = 1; // Waiting for a VP8 chunk.
|
wpi->is_partial_ = 1; // Waiting for a VP8 chunk.
|
||||||
break;
|
break;
|
||||||
case WEBP_CHUNK_IMAGE:
|
case WEBP_CHUNK_IMAGE:
|
||||||
|
if (wpi->img_ != NULL) goto Fail; // Only 1 image chunk allowed.
|
||||||
if (ChunkSetNth(&subchunk, &wpi->img_, 1) != WEBP_MUX_OK) goto Fail;
|
if (ChunkSetNth(&subchunk, &wpi->img_, 1) != WEBP_MUX_OK) goto Fail;
|
||||||
if (!MuxImageFinalize(wpi)) goto Fail;
|
if (!MuxImageFinalize(wpi)) goto Fail;
|
||||||
wpi->is_partial_ = 0; // wpi is completely filled.
|
wpi->is_partial_ = 0; // wpi is completely filled.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user