History

fix crash issue for too big packet size

Licai Guo committed 12 years ago

Commit 15bd7da1 parent c7f19743 files · +11 −4Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 3 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+7−0
@@ -344,6 +344,13 @@ DECODING_STATE CWelsDecoder::DecodeFrame (const unsigned char* kpSrc, · 343 unmodified lines
344344 const int kiSrcLen,
345345 void_t** ppDst,
346346 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+ }
347354 if (kiSrcLen > 0 && kpSrc != NULL) {
348355 #ifdef OUTPUT_BIT_STREAM
349356 if (m_pFBS) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t