<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11371">View Change</a></p><div style="white-space:pre-wrap">Approvals:
mattf: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><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 main/media_cache.c<br>M pbx/pbx_dundi.c<br>M utils/extconf.c<br>M utils/smsq.c<br>8 files changed, 12 insertions(+), 12 deletions(-)<br><br></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 cdc57aa..26fe16b 100644</span><br><span>--- a/apps/app_adsiprog.c</span><br><span>+++ b/apps/app_adsiprog.c</span><br><span>@@ -588,7 +588,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 9aef039..c5b70ec 100644</span><br><span>--- a/apps/app_followme.c</span><br><span>+++ b/apps/app_followme.c</span><br><span>@@ -224,7 +224,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 9113ffa..a5ee2db 100644</span><br><span>--- a/channels/chan_console.c</span><br><span>+++ b/channels/chan_console.c</span><br><span>@@ -849,10 +849,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 e41d991..a7b2f26 100644</span><br><span>--- a/channels/chan_iax2.c</span><br><span>+++ b/channels/chan_iax2.c</span><br><span>@@ -3814,7 +3814,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>@@ -6836,7 +6836,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>diff --git a/main/media_cache.c b/main/media_cache.c</span><br><span>index 97a80d5..4493235 100644</span><br><span>--- a/main/media_cache.c</span><br><span>+++ b/main/media_cache.c</span><br><span>@@ -160,8 +160,8 @@</span><br><span> sizeof(bucket_file->path));</span><br><span> } else if (!strchr(bucket_file->path, '.') && (ext = strrchr(ast_sorcery_object_get_id(bucket_file), '.'))) {</span><br><span> /* If we don't have a file extension and were provided one in the URI, use it */</span><br><span style="color: hsl(0, 100%, 40%);">- char new_path[PATH_MAX];</span><br><span style="color: hsl(0, 100%, 40%);">- char found_ext[PATH_MAX];</span><br><span style="color: hsl(120, 100%, 40%);">+ char found_ext[32];</span><br><span style="color: hsl(120, 100%, 40%);">+ char new_path[PATH_MAX + sizeof(found_ext)];</span><br><span> </span><br><span> ast_bucket_file_metadata_set(bucket_file, "ext", ext);</span><br><span> </span><br><span>diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c</span><br><span>index fa90cb8..ec150f3 100644</span><br><span>--- a/pbx/pbx_dundi.c</span><br><span>+++ b/pbx/pbx_dundi.c</span><br><span>@@ -2123,7 +2123,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>@@ -2722,7 +2722,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> </span><br><span>diff --git a/utils/extconf.c b/utils/extconf.c</span><br><span>index 129dcc8..9ffa3f6 100644</span><br><span>--- a/utils/extconf.c</span><br><span>+++ b/utils/extconf.c</span><br><span>@@ -3005,7 +3005,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/+/11371">change 11371</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/+/11371"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e </div>
<div style="display:none"> Gerrit-Change-Number: 11371 </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-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: mattf <creslin@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>