Skip to content
This repository was archived by the owner on May 17, 2023. It is now read-only.

Commit 83dd5e0

Browse files
chuanli1dmitryermilov
authored andcommitted
[Decode] dctbl pointer check code refactor
Issue: MDP-68544 Test: manual
1 parent 6691cbd commit 83dd5e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,10 +2376,10 @@ JERRCODE CJPEGDecoder::DecodeHuffmanMCURowBL(int16_t* pMCUBuf, uint32_t colMCU,
23762376
{
23772377
return JPEG_ERR_PARAMS;
23782378
}
2379+
if (m_dctbl[m_ccomp[n].m_dc_selector].IsEmpty())
2380+
return JPEG_ERR_PARAMS;
23792381
IppiDecodeHuffmanSpec* dctbl = m_dctbl[m_ccomp[n].m_dc_selector];
23802382
IppiDecodeHuffmanSpec* actbl = m_actbl[m_ccomp[n].m_ac_selector];
2381-
if(dctbl == nullptr)
2382-
return JPEG_ERR_PARAMS;
23832383
for(k = 0; k < m_ccomp[n].m_scan_vsampling; k++)
23842384
{
23852385
for(l = 0; l < m_ccomp[n].m_scan_hsampling; l++)

0 commit comments

Comments
 (0)