Merge "fix strncpy build error" into tizen accepted/tizen/unified/20200101.120630 accepted/tizen/unified/20200102.220734 submit/tizen/20191230.003618 submit/tizen/20200102.082818
authorPyun DoHyun <dh79.pyun@samsung.com>
Sun, 29 Dec 2019 23:45:46 +0000 (23:45 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Sun, 29 Dec 2019 23:45:46 +0000 (23:45 +0000)
ipsp-agent/bluetooth-ipsp-agent.c

index fd2f0dc..cd6f471 100644 (file)
@@ -492,8 +492,7 @@ static void __generate_eui64_address(char *hw_addr, char **eui64_addr)
                        strncpy(addr[i], copied, sizeof(addr[i]) - 1);
                        addr[i][(int)(sizeof(addr[i]) - 1)] = '\0';
                } else {
-                       strncpy(addr[i], copied, strlen(copied));
-                       addr[i][(int)strlen(copied)] = '\0';
+                       strncpy(addr[i], copied, sizeof(addr[i]));
                }
 
                BT_DBG("copied/ptr (%s/%s)", copied, ptr);