Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 3 files). Show all
Unified · Split
| @@ -344,6 +344,13 @@ DECODING_STATE CWelsDecoder::DecodeFrame (const unsigned char* kpSrc, · 343 unmodified lines | ||
| 344 | 344 | const int kiSrcLen, |
| 345 | 345 | void_t** ppDst, |
| 346 | 346 | SBufferInfo* pDstInfo) { |
| 347 | + if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) { | |
| 348 | + m_pDecContext->iErrorCode |= dsOutOfMemory; | |
| 349 | + IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, | |
| 350 | + "max AU size exceeded. Allowed size = %d, current size = %d", | |
| 351 | + MAX_ACCESS_UNIT_CAPACITY, kiSrcLen); | |
| 352 | + return dsOutOfMemory; | |
| 353 | + } | |
| 347 | 354 | if (kiSrcLen > 0 && kpSrc != NULL) { |
| 348 | 355 | #ifdef OUTPUT_BIT_STREAM |
| 349 | 356 | if (m_pFBS) { |