<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7535">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/35/7535/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 a6e5493..b273d25 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -30554,6 +30554,17 @@<br> }<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/7535">change 7535</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/7535"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </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: 7535 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>