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 *uri = NULL;
|
||||||
char *dynamic_url = NULL;
|
char *dynamic_url = NULL;
|
||||||
|
|
||||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname));
|
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname) - 1);
|
||||||
|
|
||||||
if (!binding) {
|
if (!binding) {
|
||||||
return NULL;
|
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 };
|
switch_stream_handle_t stream = { 0 };
|
||||||
char *txt = NULL;
|
char *txt = NULL;
|
||||||
|
|
||||||
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname));
|
strncpy(hostname, switch_core_get_switchname(), sizeof(hostname) - 1);
|
||||||
|
|
||||||
if (!binding) {
|
if (!binding) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue