Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-06 16:09:22 +0300
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-01-15 02:38:50 +0300
commit74474750f1ac522730dae271a5ea5003caa8b73c (patch)
tree12ca9734481b31e07322cb20d09bfd8b0dd2bffc /libavformat/asfdec_o.c
parent0002d845e873af4fd00f0519e0248b07d65bef5f (diff)
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>
Diffstat (limited to 'libavformat/asfdec_o.c')
-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);
}