mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-27 21:54:16 +00:00
use switch_snprintf instead of snprintf becuase in insures null termination of strings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6707 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
44636d333f
commit
54ec86f6ce
49 files changed
+306
-306
No files matched your search
@@ -94,7 +94,7 @@ SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_write(switch_stream
|
||||
ret = -1;
|
||||
} else {
|
||||
ret = 0;
|
||||
snprintf(end, remaining, "%s", data);
|
||||
switch_snprintf(end, remaining, "%s", data);
|
||||
handle->data_len = strlen(buf);
|
||||
handle->end = (uint8_t *) (handle->data) + handle->data_len;
|
||||
}
|
||||
@@ -204,7 +204,7 @@ static char prompt_str[512] = "";
|
||||
char * prompt(EditLine *e) {
|
||||
if (*prompt_str == '\0') {
|
||||
gethostname(hostname, sizeof(hostname));
|
||||
snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", hostname);
|
||||
switch_snprintf(prompt_str, sizeof(prompt_str), "freeswitch@%s> ", hostname);
|
||||
}
|
||||
|
||||
return prompt_str;
|
||||
|
||||
Reference in new issue
Block a user