<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11369">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fixes for GCC 9<br><br>Various fixes for issues caught by gcc 9. Mostly snprintf<br>trying to copy to a buffer potentially too small.<br><br>ASTERISK-28412<br><br>Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e<br>---<br>M apps/app_adsiprog.c<br>M apps/app_followme.c<br>M channels/chan_console.c<br>M channels/chan_iax2.c<br>M pbx/pbx_dundi.c<br>M utils/extconf.c<br>M utils/smsq.c<br>7 files changed, 11 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/69/11369/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c</span><br><span>index 6ca02a7..6839a72 100644</span><br><span>--- a/apps/app_adsiprog.c</span><br><span>+++ b/apps/app_adsiprog.c</span><br><span>@@ -590,7 +590,7 @@</span><br><span> }</span><br><span> </span><br><span> if (state->numsubs > 127) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_WARNING, "No more subscript space at line %d of %s\n", lineno, script);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "No more subscript space at line %d of %s\n", lineno, S_OR(script, "unknown"));</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span>diff --git a/apps/app_followme.c b/apps/app_followme.c</span><br><span>index 3e0c2c0..dfba0e0 100644</span><br><span>--- a/apps/app_followme.c</span><br><span>+++ b/apps/app_followme.c</span><br><span>@@ -222,7 +222,7 @@</span><br><span> long digts;</span><br><span> int ynidx;</span><br><span> int state;</span><br><span style="color: hsl(0, 100%, 40%);">- char dialarg[256];</span><br><span style="color: hsl(120, 100%, 40%);">+ char dialarg[768];</span><br><span> /*! Collected digits to accept/decline the call. */</span><br><span> char yn[MAX_YN_STRING];</span><br><span> /*! TRUE if the outgoing call is answered. */</span><br><span>diff --git a/channels/chan_console.c b/channels/chan_console.c</span><br><span>index cdd7a25..2d6214b 100644</span><br><span>--- a/channels/chan_console.c</span><br><span>+++ b/channels/chan_console.c</span><br><span>@@ -851,10 +851,10 @@</span><br><span> if (a->argc == e->args + 1) {</span><br><span> char *ext = NULL, *con = NULL;</span><br><span> s = ast_ext_ctx(pvt, a->argv[e->args], &ext, &con);</span><br><span style="color: hsl(0, 100%, 40%);">- ast_debug(1, "provided '%s', exten '%s' context '%s'\n",</span><br><span style="color: hsl(0, 100%, 40%);">- a->argv[e->args], mye, myc);</span><br><span> mye = ext;</span><br><span> myc = con;</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(1, "provided '%s', exten '%s' context '%s'\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ a->argv[e->args], mye, myc);</span><br><span> }</span><br><span> </span><br><span> /* supply default values if needed */</span><br><span>diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c</span><br><span>index 83d9711..43f7d2c 100644</span><br><span>--- a/channels/chan_iax2.c</span><br><span>+++ b/channels/chan_iax2.c</span><br><span>@@ -3839,7 +3839,7 @@</span><br><span> /*! \brief Show one peer in detail */</span><br><span> static char *handle_cli_iax2_show_peer(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- char status[30];</span><br><span style="color: hsl(120, 100%, 40%);">+ char status[64];</span><br><span> char cbuf[256];</span><br><span> struct iax2_peer *peer;</span><br><span> struct ast_str *codec_buf = ast_str_alloca(AST_FORMAT_CAP_NAMES_LEN);</span><br><span>@@ -6861,7 +6861,7 @@</span><br><span> static void _iax2_show_peers_one(int fd, struct mansession *s, struct show_peers_context *cont, struct iax2_peer *peer)</span><br><span> {</span><br><span> char name[256] = "";</span><br><span style="color: hsl(0, 100%, 40%);">- char status[20];</span><br><span style="color: hsl(120, 100%, 40%);">+ char status[64];</span><br><span> int retstatus;</span><br><span> struct ast_str *encmethods = ast_str_alloca(256);</span><br><span> </span><br><span>@@ -14973,7 +14973,7 @@</span><br><span> struct ast_data *data_peer;</span><br><span> struct iax2_peer *peer;</span><br><span> struct ao2_iterator i;</span><br><span style="color: hsl(0, 100%, 40%);">- char status[20];</span><br><span style="color: hsl(120, 100%, 40%);">+ char status[64];</span><br><span> struct ast_str *encmethods = ast_str_alloca(256);</span><br><span> </span><br><span> i = ao2_iterator_init(peers, 0);</span><br><span>diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c</span><br><span>index 83a1f70..0d82a3f 100644</span><br><span>--- a/pbx/pbx_dundi.c</span><br><span>+++ b/pbx/pbx_dundi.c</span><br><span>@@ -2124,7 +2124,7 @@</span><br><span> </span><br><span> static void save_secret(const char *newkey, const char *oldkey)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- char tmp[256];</span><br><span style="color: hsl(120, 100%, 40%);">+ char tmp[350];</span><br><span> if (oldkey)</span><br><span> snprintf(tmp, sizeof(tmp), "%s;%s", oldkey, newkey);</span><br><span> else</span><br><span>@@ -2703,7 +2703,7 @@</span><br><span> AST_LIST_LOCK(&peers);</span><br><span> ast_cli(a->fd, FORMAT2, "EID", "Host", "Port", "Model", "AvgTime", "Status");</span><br><span> AST_LIST_TRAVERSE(&peers, peer, list) {</span><br><span style="color: hsl(0, 100%, 40%);">- char status[20];</span><br><span style="color: hsl(120, 100%, 40%);">+ char status[64];</span><br><span> int print_line = -1;</span><br><span> char srch[2000];</span><br><span> total_peers++;</span><br><span>diff --git a/utils/extconf.c b/utils/extconf.c</span><br><span>index 1a80f66..63ec19d 100644</span><br><span>--- a/utils/extconf.c</span><br><span>+++ b/utils/extconf.c</span><br><span>@@ -3267,7 +3267,7 @@</span><br><span> if (do_include || do_exec) {</span><br><span> if (c) {</span><br><span> char *cur2;</span><br><span style="color: hsl(0, 100%, 40%);">- char real_inclusion_name[256];</span><br><span style="color: hsl(120, 100%, 40%);">+ char real_inclusion_name[525];</span><br><span> </span><br><span> /* Strip off leading and trailing "'s and <>'s */</span><br><span> while((*c == '<') || (*c == '>') || (*c == '\"')) c++;</span><br><span>diff --git a/utils/smsq.c b/utils/smsq.c</span><br><span>index 4934ef7..8fd36ad 100644</span><br><span>--- a/utils/smsq.c</span><br><span>+++ b/utils/smsq.c</span><br><span>@@ -98,7 +98,7 @@</span><br><span> */</span><br><span> static char txqcheck (char *dir, char *queue, char subaddress, char *channel, char *callerid, int wait, int delay, int retries, int concurrent)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">- char ogname[100],</span><br><span style="color: hsl(120, 100%, 40%);">+ char ogname[300],</span><br><span> temp[100],</span><br><span> dirname[100],</span><br><span> *p=NULL;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11369">change 11369</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11369"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e </div>
<div style="display:none"> Gerrit-Change-Number: 11369 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>