ref: 855d1cf8c20e2259e1330288e9bca859215abe56
parent: 8b1206001c27db9828a659f07963154d74cbc41c
author: sijchen <sijchen@cisco.com>
date: Mon Feb 15 06:54:51 EST 2016
add input parameter check as protection for an encoder interface
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3423,6 +3423,10 @@
}
int32_t WelsEncoderEncodeParameterSets (sWelsEncCtx* pCtx, void* pDst) {
+ if (NULL == pCtx || NULL == pDst) {
+ return ENC_RETURN_UNEXPECTED;
+ }
+
SFrameBSInfo* pFbi = (SFrameBSInfo*)pDst;
SLayerBSInfo* pLayerBsInfo = &pFbi->sLayerInfo[0];
int32_t iCountNal = 0;