From f577d724de6cf8d040a113d337d4433b0f7478e2 Mon Sep 17 00:00:00 2001 From: chuanli1 Date: Mon, 7 Mar 2022 15:06:52 +0800 Subject: [PATCH] [Decode] check if the buffer size is valid Issue: MDP-68762 Test: manual --- _studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_hw_vaapi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/_studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_hw_vaapi.cpp b/_studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_hw_vaapi.cpp index 2aa4d35d6d..986fb2d3df 100644 --- a/_studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_hw_vaapi.cpp +++ b/_studio/mfx_lib/decode/vp8/src/mfx_vp8_dec_decode_hw_vaapi.cpp @@ -329,6 +329,7 @@ mfxStatus VideoDECODEVP8_HW::PackHeaders(mfxBitstream *p_bistream) ////////////////////////////////////////////////////////////////// UMC::UMCVACompBuffer* compBufBs; + MFX_CHECK(p_bistream->DataLength > offset, MFX_ERR_INVALID_VIDEO_PARAM); uint8_t *bistreamData = (uint8_t *)m_p_video_accelerator->GetCompBuffer(VASliceDataBufferType, &compBufBs, p_bistream->DataLength - offset); uint8_t *pBuffer = (uint8_t*) p_bistream->Data;