ref: 031892265497de13b3f0c0305a00b0dbe2ddba24
parent: 9b5915326346794a994e574c0d3364a13f52796d
author: Martin Storsjö <[email protected]>
date: Tue Jan 28 06:48:19 EST 2014
Check the right pointer for being non-null in WelsLogDefault In case the log level was invalid, GetLogTag returns null. Checking pCtx doesn't make sense since nothing within the if block uses pCtx.
--- a/codec/encoder/core/src/utils.cpp
+++ b/codec/encoder/core/src/utils.cpp
@@ -207,7 +207,7 @@
int32_t i_shift = 0;
str_t* pStr = NULL;
pStr = GetLogTag (kiLevel, &i_shift);
- if (NULL != pCtx) {
+ if (NULL != pStr) {
int32_t iLenTag = strlen (pStr); // confirmed_safe_unsafe_usage
STRCAT (&pBuf[iBufUsed], iBufLeft, pStr); // confirmed_safe_unsafe_usage
iBufUsed += iLenTag;