X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fcafdec.c;h=337758ee12724b476a21d901d8af8343d1753e69;hb=6d1e9d993a5559ca5c4a578fce499c74528fe8d1;hp=f12226a8f53c63b9a398e1d90c734fd3af759696;hpb=c62cb1112ffc32492c99aa1e94324fc6a951abe9;p=ffmpeg diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index f12226a8f53..337758ee127 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))); }