Browse Source

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>
tags/n3.0
Andreas Cadhalpun 10 years ago
parent
commit
74474750f1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/asfdec_o.c

+ 1
- 1
libavformat/asfdec_o.c View File

@@ -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);
}



Loading…
Cancel
Save