aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-06 14:09:22 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-15 00:38:50 +0100
commit74474750f1ac522730dae271a5ea5003caa8b73c (patch)
tree12ca9734481b31e07322cb20d09bfd8b0dd2bffc
parent0002d845e873af4fd00f0519e0248b07d65bef5f (diff)
downloadffmpeg-74474750f1ac522730dae271a5ea5003caa8b73c.tar.gz
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>
-rw-r--r--libavformat/asfdec_o.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index bc168d3516..b81519fb18 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -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);
}