Fixes for GCC 9

Various fixes for issues caught by gcc 9.  Mostly snprintf
trying to copy to a buffer potentially too small.

ASTERISK-28412

Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
This commit is contained in:
George Joseph
2019-05-10 09:48:28 -06:00
parent 9a0fa51443
commit e7734476c6
8 changed files with 12 additions and 12 deletions

View File

@@ -2123,7 +2123,7 @@ static void build_secret(char *secret, int seclen)
static void save_secret(const char *newkey, const char *oldkey)
{
char tmp[256];
char tmp[350];
if (oldkey)
snprintf(tmp, sizeof(tmp), "%s;%s", oldkey, newkey);
else
@@ -2722,7 +2722,7 @@ static char *dundi_show_peers(struct ast_cli_entry *e, int cmd, struct ast_cli_a
AST_LIST_LOCK(&peers);
ast_cli(a->fd, FORMAT2, "EID", "Host", "Port", "Model", "AvgTime", "Status");
AST_LIST_TRAVERSE(&peers, peer, list) {
char status[20];
char status[64];
int print_line = -1;
char srch[2000];