CID:1214140 Buffer not null terminated, make sure hostname is always null terminated
This commit is contained in:
parent
16805187ec
commit
619b31e1e8
|
@ -642,7 +642,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_db_load)
|
||||||
switch_limit_interface_t *limit_interface;
|
switch_limit_interface_t *limit_interface;
|
||||||
|
|
||||||
memset(&globals, 0, sizeof(globals));
|
memset(&globals, 0, sizeof(globals));
|
||||||
strncpy(globals.hostname, switch_core_get_switchname(), sizeof(globals.hostname));
|
strncpy(globals.hostname, switch_core_get_switchname(), sizeof(globals.hostname) -1 );
|
||||||
globals.pool = pool;
|
globals.pool = pool;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue