mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
demux: strictly enforce the animation flag
if the flag is incorrectly set in a VP8L or VP8/ALPH single image file the demux will now fail. Change-Id: Id4d5f2d3f6922a29b442c5d3d0acbe3d679e468a
This commit is contained in:
parent
c4f39f4a31
commit
e18e66779b
@ -513,8 +513,9 @@ static ParseStatus ParseVP8X(WebPDemuxer* const dmux) {
|
||||
case MKFOURCC('A', 'L', 'P', 'H'):
|
||||
case MKFOURCC('V', 'P', '8', ' '):
|
||||
case MKFOURCC('V', 'P', '8', 'L'): {
|
||||
const int has_frames = !!(dmux->feature_flags_ & ANIMATION_FLAG);
|
||||
// check that this isn't an animation (all frames should be in an ANMF).
|
||||
if (anim_chunks > 0) return PARSE_ERROR;
|
||||
if (anim_chunks > 0 || has_frames) return PARSE_ERROR;
|
||||
|
||||
Rewind(mem, CHUNK_HEADER_SIZE);
|
||||
status = ParseSingleImage(dmux);
|
||||
|
Loading…
Reference in New Issue
Block a user