]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[fs_cli] Coverity 1468564 Buffer not null terminated
authorAndrey Volk <andywolk@gmail.com>
Fri, 31 Jan 2025 14:38:26 +0000 (17:38 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 3 Feb 2025 23:18:47 +0000 (02:18 +0300)
libs/esl/fs_cli.c

index 973df741e023c3b5aedf0a62baa18fea1cc6c537..f98171b803f9b79a9a0255bb547e0b81decbc7ab 100644 (file)
@@ -1521,7 +1521,7 @@ int main(int argc, char *argv[])
 
        strncpy(internal_profile.host, "127.0.0.1", sizeof(internal_profile.host));
        strncpy(internal_profile.pass, "ClueCon", sizeof(internal_profile.pass));
-       strncpy(internal_profile.name, hostname, sizeof(internal_profile.name));
+       snprintf(internal_profile.name, sizeof(internal_profile.name), "%s", hostname); 
        internal_profile.port = 8021;
        set_fn_keys(&internal_profile);
        esl_set_string(internal_profile.prompt_color, prompt_color);