diff --git a/libavformat/smacker.c b/libavformat/smacker.c index a15bded119160d02b1887c9b034143e16a347295..f8a0769acd16c550cd0dc21aeeab3787de5e7ca7 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -327,7 +327,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt) } flags >>= 1; } - if (frame_size < 0) + if (frame_size < 0 || frame_size >= INT_MAX/2) return AVERROR_INVALIDDATA; if (av_new_packet(pkt, frame_size + 769)) return AVERROR(ENOMEM);