From: Cheoleun Moon Date: Thu, 9 Apr 2020 10:15:52 +0000 (+0900) Subject: Use length of strncpy as size of destination X-Git-Tag: submit/tizen/20200616.063112~5^2~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2348944131eb93ea94cfa0b3fe7d568099304ff4;p=platform%2Fcore%2Fapi%2Fwifi-aware.git Use length of strncpy as size of destination --- diff --git a/cts-verifier/cts-verifier-subscribe-test.c b/cts-verifier/cts-verifier-subscribe-test.c index ae0fd2f..d31aeea 100644 --- a/cts-verifier/cts-verifier-subscribe-test.c +++ b/cts-verifier/cts-verifier-subscribe-test.c @@ -310,7 +310,7 @@ void test_psk_passive() test_init(); g_sub_type = WIFI_AWARE_SUBSCRIBE_TYPE_PASSIVE; g_security_type = WIFI_AWARE_SECURITY_TYPE_PSK; - strncpy(g_psk, PASSPHRASE, strlen(PASSPHRASE)); + strncpy(g_psk, PASSPHRASE, MAX_PSK_LEN); run_common(); } @@ -320,6 +320,6 @@ void test_psk_active() test_init(); g_sub_type = WIFI_AWARE_SUBSCRIBE_TYPE_ACTIVE; g_security_type = WIFI_AWARE_SECURITY_TYPE_PSK; - strncpy(g_psk, PASSPHRASE, strlen(PASSPHRASE)); + strncpy(g_psk, PASSPHRASE, MAX_PSK_LEN); run_common(); }