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 <h_w.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18107Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarJihun Ha <jihun.ha@samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
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);
SetUserProperties(&g_userProperties);
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