X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fbintext.c;h=bc0f6bd099fd7d4929d3d4579fdaeb76d5b62135;hb=520754476d9c2627b610fb9c508d0a85182d5a87;hp=144b4172af32c9e5963c8db50432bc823c7e14cf;hpb=442d53f409c8d84c7db120227caac00af54aa884;p=ffmpeg diff --git a/libavformat/bintext.c b/libavformat/bintext.c index 144b4172af3..bc0f6bd099f 100644 --- a/libavformat/bintext.c +++ b/libavformat/bintext.c @@ -293,6 +293,8 @@ static int adf_read_header(AVFormatContext *s) bin->fsize = avio_size(pb) - 1 - 192 - 4096; st->codecpar->width = 80<<3; ff_sauce_read(s, &bin->fsize, &got_width, 0); + if (st->codecpar->width < 8) + return AVERROR_INVALIDDATA; if (!bin->width) calculate_height(st->codecpar, bin->fsize); avio_seek(pb, 1 + 192 + 4096, SEEK_SET);