Commit a0e0e1e1 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmdec: fix hypothetical overflows

Fixes CID703739
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 71bc8c95
......@@ -111,8 +111,8 @@ static int ffm_read_data(AVFormatContext *s,
if (ffm->first_packet || (frame_offset & 0x8000)) {
if (!frame_offset) {
/* This packet has no frame headers in it */
if (avio_tell(pb) >= ffm->packet_size * 3) {
avio_seek(pb, -ffm->packet_size * 2, SEEK_CUR);
if (avio_tell(pb) >= ffm->packet_size * 3LL) {
avio_seek(pb, -ffm->packet_size * 2LL, SEEK_CUR);
goto retry_read;
}
/* This is bad, we cannot find a valid frame header */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment