ref: 215eb564533d331768e86a9211a71505cbd3e0a4
parent: 7791a6d28d10223f441d0016819752a218b1a10b
author: Martin Storsjö <martin@martin.st>
date: Tue Jan 28 07:05:28 EST 2014
Use WelsStrncpy instead of STRNCPY
--- a/codec/encoder/core/src/property.cpp
+++ b/codec/encoder/core/src/property.cpp
@@ -69,7 +69,7 @@
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 @@
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 @@
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 @@
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;
}
--- a/codec/encoder/plus/src/welsCodecTrace.cpp
+++ b/codec/encoder/plus/src/welsCodecTrace.cpp
@@ -123,7 +123,7 @@
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);
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -994,7 +994,7 @@
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