Use WelsStrncpy instead of STRNCPY
This commit is contained in:
parent
7791a6d28d
commit
215eb56453
@ -69,7 +69,7 @@ int32_t GetCodeName (str_t* pBuf, int32_t iSize) {
|
||||
return 0;
|
||||
|
||||
pBuf[iLen] = '\0';
|
||||
STRNCPY (pBuf, iSize, WELS_CODE_NAME, iLen); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (pBuf, iSize, WELS_CODE_NAME, iLen); // confirmed_safe_unsafe_usage
|
||||
|
||||
return iLen;
|
||||
}
|
||||
@ -91,7 +91,7 @@ int32_t GetLibName (str_t* pBuf, int32_t iSize) {
|
||||
return 0;
|
||||
|
||||
pBuf[iLen] = '\0';
|
||||
STRNCPY (pBuf, iSize, WELS_LIB_NAME, iLen); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (pBuf, iSize, WELS_LIB_NAME, iLen); // confirmed_safe_unsafe_usage
|
||||
|
||||
return iLen;
|
||||
}
|
||||
@ -113,7 +113,7 @@ int32_t GetVerNum (str_t* pBuf, int32_t iSize) {
|
||||
return 0;
|
||||
|
||||
pBuf[iLen] = '\0';
|
||||
STRNCPY (pBuf, iSize, WELS_VERSION_STR, iLen); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (pBuf, iSize, WELS_VERSION_STR, iLen); // confirmed_safe_unsafe_usage
|
||||
|
||||
return iLen;
|
||||
}
|
||||
@ -135,7 +135,7 @@ int32_t GetIdentInfo (str_t* pBuf, int32_t iSize) {
|
||||
return 0;
|
||||
|
||||
pBuf[iLen] = '\0';
|
||||
STRNCPY (pBuf, iSize, WELS_IDENT, iLen); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (pBuf, iSize, WELS_IDENT, iLen); // confirmed_safe_unsafe_usage
|
||||
|
||||
return iLen;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ void welsCodecTrace::CODEC_TRACE (void* ignore, const int32_t iLevel, const str_
|
||||
const int32_t len = strlen ("[ENCODER]: "); // confirmed_safe_unsafe_usage
|
||||
|
||||
|
||||
STRNCPY (pBuf, MAX_LOG_SIZE, "[ENCODER]: ", len); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (pBuf, MAX_LOG_SIZE, "[ENCODER]: ", len); // confirmed_safe_unsafe_usage
|
||||
WelsVsnprintf (pBuf + len, MAX_LOG_SIZE - len, Str_Format, vl); // confirmed_safe_unsafe_usage
|
||||
|
||||
// g_WelsCodecTrace.TraceString(iLevel, pBuf);
|
||||
|
@ -994,7 +994,7 @@ void CWelsH264SVCEncoder::DumpSrcPicture (const uint8_t* pSrc) {
|
||||
str_t strFileName[256] = {0};
|
||||
const int32_t iDataLength = m_iMaxPicWidth * m_iMaxPicHeight;
|
||||
|
||||
STRNCPY (strFileName, 256, "pic_in_", strlen ("pic_in_")); // confirmed_safe_unsafe_usage
|
||||
WelsStrncpy (strFileName, 256, "pic_in_", strlen ("pic_in_")); // confirmed_safe_unsafe_usage
|
||||
|
||||
if (m_iMaxPicWidth == 640) {
|
||||
STRCAT (strFileName, 256, "360p."); // confirmed_safe_unsafe_usage
|
||||
|
Loading…
x
Reference in New Issue
Block a user