Commit 789d5edc authored by Parkhi's avatar Parkhi Committed by Uze Choi

Fix defects detected by static code analyzer

- When using the strncpy function, modified it to include a null termination

Change-Id: Ibb47c2737c13558e5d18f809673300d2f8a0e8a7
Signed-off-by: default avatarParkhi <>
Reviewed-on: default avatarjenkins-iotivity <>
Reviewed-by: default avatarJihun Ha <>
Reviewed-by: default avatarUze Choi <>
parent ef56d035
......@@ -211,7 +211,7 @@ void SetDeviceInfo()
char userValue_str[] = "user_str";
g_userProperties.userValue_int = 0;
strncpy(g_userProperties.userValue_str, userValue_str, strlen(userValue_str));
strncpy(g_userProperties.userValue_str, userValue_str, strlen(userValue_str) + 1);
if(ESSetDeviceProperty(&deviceProperty) == ES_ERROR)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment