<p>Igor Goncharovsky has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16171">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_ari: Fix audiosocket segfault<br><br>Add check that data parameter specified when audiosocket used for externalMedia.<br><br>ASTERISK-29514 #close<br><br>Change-Id: Ie562f03c5d6c3835a3631f376b3d43e75b8f9617<br>---<br>M res/ari/resource_channels.c<br>1 file changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/71/16171/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c</span><br><span>index 31856dc..a3d0f31 100644</span><br><span>--- a/res/ari/resource_channels.c</span><br><span>+++ b/res/ari/resource_channels.c</span><br><span>@@ -2134,6 +2134,11 @@</span><br><span> struct ast_channel *chan;</span><br><span> struct varshead *vars;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_strlen_zero(args->data)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_ari_response_error(response, 400, "Bad Request", "data can not be empty");</span><br><span style="color: hsl(120, 100%, 40%);">+ return;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> endpoint_len = strlen("AudioSocket/") + strlen(args->external_host) + 1 + strlen(args->data) + 1;</span><br><span> endpoint = ast_alloca(endpoint_len);</span><br><span> /* The UUID is stored in the arbitrary data field */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16171">change 16171</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/+/16171"/><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: Ie562f03c5d6c3835a3631f376b3d43e75b8f9617 </div>
<div style="display:none"> Gerrit-Change-Number: 16171 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Igor Goncharovsky <igor.goncharovsky@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>