X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fqdrw.c;h=65279c98052b81a129c6fa901c5c025525b68d9c;hb=ddee53e2680a03a8b8beaa0de02e235046c599c3;hp=32ba41096863a5a35381f98201728d818da15b98;hpb=0ff76ca86e0ea4dcf2b392c45f5fac8e5576bb0d;p=ffmpeg diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 32ba4109686..65279c98052 100644 --- a/libavcodec/qdrw.c +++ b/libavcodec/qdrw.c @@ -455,6 +455,8 @@ static int decode_frame(AVCodecContext *avctx, avpriv_request_sample(avctx, "Pack type %d", pack_type); return AVERROR_PATCHWELCOME; } + if (bytestream2_get_bytes_left(&gbc) < 30) + return AVERROR_INVALIDDATA; if ((ret = ff_get_buffer(avctx, p, 0)) < 0) return ret;