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