Commit e8b79358 authored by AlexandrX Konovalov's avatar AlexandrX Konovalov Committed by Oleg Nabiullin

Add checking for arguments of IPP functions against NULL

Issue: MDP-52543
parent f527cc7c
......@@ -2538,6 +2538,12 @@ JERRCODE CJPEGDecoder::ReconstructMCURowBL8x8_NxN(int16_t* pMCUBuf,
curr_lnz = mcu_col * curr_comp->m_lnz_ds;
qtbl = m_qntbl[curr_comp->m_q_selector];
if(!qtbl)
{
LOG1("Error: in CJPEGDecoder::ReconstructMCURowBL8x8_NxN() m_qntbl[] is empty for ",
curr_comp->m_q_selector);
return JPEG_ERR_INTERNAL;
}
for(k = 0; k < curr_comp->m_vsampling; k++)
{
......@@ -2627,6 +2633,12 @@ JERRCODE CJPEGDecoder::ReconstructMCURowBL8x8(int16_t* pMCUBuf,
curr_comp = &m_ccomp[c];
qtbl = m_qntbl[curr_comp->m_q_selector];
if(!qtbl)
{
LOG1("Error: in CJPEGDecoder::ReconstructMCURowBL8x8_NxN() m_qntbl[] is empty for ",
curr_comp->m_q_selector);
return JPEG_ERR_INTERNAL;
}
for(k = 0; k < curr_comp->m_scan_vsampling; k++)
{
......@@ -2687,6 +2699,12 @@ JERRCODE CJPEGDecoder::ReconstructMCURowBL8x8To4x4(int16_t* pMCUBuf,
{
curr_comp = &m_ccomp[c];
qtbl = m_qntbl[curr_comp->m_q_selector];
if(!qtbl)
{
LOG1("Error: in CJPEGDecoder::ReconstructMCURowBL8x8To4x4() m_qntbl[] is empty for ",
curr_comp->m_q_selector);
return JPEG_ERR_INTERNAL;
}
for(k = 0; k < curr_comp->m_vsampling; k++)
{
......@@ -2786,6 +2804,12 @@ JERRCODE CJPEGDecoder::ReconstructMCURowBL8x8To2x2(int16_t* pMCUBuf,
{
curr_comp = &m_ccomp[c];
qtbl = m_qntbl[curr_comp->m_q_selector];
if(!qtbl)
{
LOG1("Error: in CJPEGDecoder::ReconstructMCURowBL8x8To4x4() m_qntbl[] is empty for ",
curr_comp->m_q_selector);
return JPEG_ERR_INTERNAL;
}
for(k = 0; k < curr_comp->m_vsampling; k++)
{
......@@ -2982,6 +3006,12 @@ JERRCODE CJPEGDecoder::ReconstructMCURowEX(int16_t* pMCUBuf,
curr_comp = &m_ccomp[c];
qtbl = m_qntbl[curr_comp->m_q_selector];
if(!qtbl)
{
LOG1("Error: in CJPEGDecoder::ReconstructMCURowBL8x8To1x1() m_qntbl[] is empty for ",
curr_comp->m_q_selector);
return JPEG_ERR_INTERNAL;
}
for(k = 0; k < curr_comp->m_vsampling; k++)
{
......
......@@ -2325,6 +2325,11 @@ JERRCODE CJPEGEncoder::ColorConvert(uint32_t rowMCU, uint32_t colMCU, uint32_t m
pDst8u = m_ccomp[0].GetCCBufferPtr(0/*thread_id*/);
if(!pSrc8u)
{
LOG0("Error: empty pSrc8u in CJPEGEncoder::ColorConvert()");
return JPEG_ERR_INTERNAL;
}
status = mfxiRGBToY_JPEG_8u_C3C1R(pSrc8u,srcStep,pDst8u,dstStep,roi);
if(ippStsNoErr != status)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment