mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 15:32:53 +01:00
Demux: Fix a potential memleak
Change-Id: Ic0dcac010da088b791c130be4abacdd8c31e92cf
This commit is contained in:
parent
7ebdf110af
commit
94328d6457
@ -317,6 +317,7 @@ static ParseStatus ParseAnimationFrame(
|
|||||||
frame->duration_ = ReadLE24s(mem);
|
frame->duration_ = ReadLE24s(mem);
|
||||||
frame->dispose_method_ = (WebPMuxAnimDispose)(ReadByte(mem) & 1);
|
frame->dispose_method_ = (WebPMuxAnimDispose)(ReadByte(mem) & 1);
|
||||||
if (frame->width_ * (uint64_t)frame->height_ >= MAX_IMAGE_AREA) {
|
if (frame->width_ * (uint64_t)frame->height_ >= MAX_IMAGE_AREA) {
|
||||||
|
free(frame);
|
||||||
return PARSE_ERROR;
|
return PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user