[mod_snom, mod_snmp] Replace strncpy with snprintf

This commit is contained in:
Andrey Volk committed 2021-03-17 19:25:46 +03:00
1 parent 2a8804af97
commit d127eeeecc
2 files changed
+15 -15

No files matched your search

+1 -1
View File
@@ -143,7 +143,7 @@ SWITCH_STANDARD_API(snom_command_api_function)
}
if (switch_inet_pton(AF_INET, argv[0], &ip)) {
strncpy(host, argv[0], sizeof(host));
snprintf(host, sizeof(host), "%s", argv[0]);
} else {
char *sql = NULL;
char *ret = NULL;