]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1214130 Buffer not null terminated
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 14:37:43 +0000 (14:37 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 14:37:43 +0000 (14:37 +0000)
src/mod/xml_int/mod_xml_curl/mod_xml_curl.c
src/mod/xml_int/mod_xml_scgi/mod_xml_scgi.c

index 334774d53f8ec9b340749bdcf35eb707a96b3af8..112b370af053ec60abc4a0d40fe7f643ee4bcb73 100644 (file)
@@ -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;
index 981543ab53f6c72a43a48a4c46b8863c24c7d845..16f0e9a8938c6dcba220a85c4bef0b5744c0eae2 100644 (file)
@@ -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;