mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-23 11:44:14 +00:00
CID:1214130 Buffer not null terminated
This commit is contained in:
1 parent
ebc0a99f1c
commit
455ed10e40
2 files changed
+2
-2
No files matched your search
@@ -158,7 +158,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
|
||||
char *uri = NULL;
|
||||
char *dynamic_url = NULL;
|
||||
|
||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname));
|
||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname) - 1);
|
||||
|
||||
if (!binding) {
|
||||
return NULL;
|
||||
|
||||
@@ -145,7 +145,7 @@ static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, con
|
||||
switch_stream_handle_t stream = { 0 };
|
||||
char *txt = NULL;
|
||||
|
||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname));
|
||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname) - 1);
|
||||
|
||||
if (!binding) {
|
||||
return NULL;
|
||||
|
||||
Reference in new issue
Block a user