shithub: openh264

Download patch

ref: de1a70d16444c21b0e5b2b4fcce4f42a6fa09b79
parent: 4537682042123d624da9af87b0d0f5699184a043
parent: 855d1cf8c20e2259e1330288e9bca859215abe56
author: ruil2 <ruil2@cisco.com>
date: Thu Feb 18 05:24:55 EST 2016

Merge pull request #2363 from sijchen/fix_free5

[Encoder] 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
@@ -3427,6 +3427,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;