CID:1214130 Buffer not null terminated
This commit is contained in:
parent
ebc0a99f1c
commit
455ed10e40
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue