X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=libavcodec%2Fdxv.c;h=6f3c075d06be75e39395de2dff434a80bfb93a4f;hb=eb5049227033d946add93c0714bb8a28d94166f1;hp=4b1c2d25ccfa0ae823602b12595159514d1dfc03;hpb=93bf0480c2dba12990f92cdf1927da2ff64db0cd;p=android-x86%2Fexternal-ffmpeg.git diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index 4b1c2d25cc..6f3c075d06 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -335,6 +335,9 @@ static int dxv_decompress_raw(AVCodecContext *avctx) DXVContext *ctx = avctx->priv_data; GetByteContext *gbc = &ctx->gbc; + if (bytestream2_get_bytes_left(gbc) < ctx->tex_size) + return AVERROR_INVALIDDATA; + bytestream2_get_buffer(gbc, ctx->tex_data, ctx->tex_size); return 0; }