mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
asfdec_o: prevent overflow causing seekback
This fixes infinite loops.
Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 74474750f1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -167,7 +167,7 @@ static void swap_guid(ff_asf_guid guid)
|
||||
|
||||
static void align_position(AVIOContext *pb, int64_t offset, uint64_t size)
|
||||
{
|
||||
if (avio_tell(pb) != offset + size)
|
||||
if (size < INT64_MAX - offset && avio_tell(pb) != offset + size)
|
||||
avio_seek(pb, offset + size, SEEK_SET);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user