X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdxv.c;h=6fe5516505a157b4767e746e98fc156aa0e20793;hb=80155795bb433fe588a957be9fb96a0a2608a00f;hp=aef5ec19dd6b6970d91fd264698a10ce6bbfde7f;hpb=b8eb0827f053230dd919bc73e25381b47b4fe1a7;p=ffmpeg diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index aef5ec19dd6..6fe5516505a 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -256,6 +256,8 @@ static int decompress_texture_thread(AVCodecContext *avctx, void *arg, #define CHECKPOINT(x) \ do { \ if (state == 0) { \ + if (bytestream2_get_bytes_left(gbc) < 4) \ + return AVERROR_INVALIDDATA; \ value = bytestream2_get_le32(gbc); \ state = 16; \ } \