summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/cafdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index f12226a8f5..337758ee12 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -300,7 +300,7 @@ static int read_header(AVFormatContext *s)
}
if (size > 0) {
- if (pos + size < pos)
+ if (pos > INT64_MAX - size)
return AVERROR_INVALIDDATA;
avio_skip(pb, FFMAX(0, pos + size - avio_tell(pb)));
}