Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -361,7 +361,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 360 unmodified lines | ||
| 361 | 361 | const int kiSrcLen, |
| 362 | 362 | void** ppDst, |
| 363 | 363 | SBufferInfo* pDstInfo) { |
| 364 | − if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY) { | |
| 364 | + if (kiSrcLen > MAX_ACCESS_UNIT_CAPACITY - MAX_MACROBLOCK_CAPACITY) {//prevent from residual reading overflow | |
| 365 | 365 | m_pDecContext->iErrorCode |= dsOutOfMemory; |
| 366 | 366 | IWelsTrace::WelsVTrace (m_pTrace, IWelsTrace::WELS_LOG_INFO, |
| 367 | 367 | "max AU size exceeded. Allowed size = %d, current size = %d", |