<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7534">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">chan_sip: Don't crash in Dial on invalid destination<br><br>Stripping the DNID in a SIP dial string can result in attempting to call<br>the argument parsing macros on an empty string, causing a crash.<br><br>ASTERISK-26131 #close<br>Reported by: Dwayne Hubbard<br>Patches:<br> dw-asterisk-master-dnid-crash.patch (license #6257) patch<br> uploaded by Dwayne Hubbard<br><br>Change-Id: Ib84c1f740a9ec0539d582b09d847fc85ddca1c5e<br>---<br>M channels/chan_sip.c<br>1 file changed, 11 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/34/7534/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index b8cc7bf..b1a8de5 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -30465,6 +30465,17 @@<br> ast_string_field_set(p, todnid, dnid);<br> }<br> <br>+ /* If stripping the DNID left us with nothing, bail out */<br>+ if (ast_strlen_zero(tmp)) {<br>+ dialog_unlink_all(p);<br>+ dialog_unref(p, "unref dialog p from bad destination");<br>+ *cause = AST_CAUSE_DESTINATION_OUT_OF_ORDER;<br>+ if (callid) {<br>+ ast_callid_unref(callid);<br>+ }<br>+ return NULL;<br>+ }<br>+<br> /* Divvy up the items separated by slashes */<br> AST_NONSTANDARD_APP_ARGS(args, tmp, '/');<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7534">change 7534</a>. To unsubscribe, 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/7534"/><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-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib84c1f740a9ec0539d582b09d847fc85ddca1c5e </div>
<div style="display:none"> Gerrit-Change-Number: 7534 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>