Diff between a18ad9bb9e4b05e5b3410db9cb11af415a473d4c and 09e56ac52aebf9d0e2f1307dfca8fb281509b6a9

Changed Files

File Additions Deletions Status
tools/btpclient.c +2 -2 modified

Full Patch

diff --git a/tools/btpclient.c b/tools/btpclient.c
index 3f958e6..777513c 100644
--- a/tools/btpclient.c
+++ b/tools/btpclient.c
@@ -377,8 +377,8 @@ static void btp_gap_read_info(uint8_t index, const void *param, uint16_t length,
 		goto failed;
 	}
 
-	strncpy((char *) rp.name, str, sizeof(rp.name));
-	strncpy((char *) rp.short_name, str, sizeof(rp.short_name));
+	snprintf((char *)rp.name, sizeof(rp.name), "%s", str);
+	snprintf((char *)rp.short_name, sizeof(rp.short_name), "%s", str);
 	rp.supported_settings = L_CPU_TO_LE32(adapter->supported_settings);
 	rp.current_settings = L_CPU_TO_LE32(adapter->current_settings);