<p>I agree with <a href="https://github.com/brettnem" class="user-mention">@brettnem</a>'s assessment of the problem with <a href="https://github.com/OpenSIPS/opensips/issues/593" class="issue-link" title="Updating parts of $du results in malformed duri">#593</a>.  As <a href="https://github.com/liviuchircu" class="user-mention">@liviuchircu</a> pointed out, this pull requests addresses the problem in <code>do_action.c:1032</code> where a colon is blindly added if the user exists without consideration for the presence of an actual password... it attempts a memcpy on a NULL pointer no less (albeit with a length of 0).</p>

<p>I think if <code>parse_uri(tmp, len, &amp;uri)&lt;0)</code> finds an actual semi colon after the user and the password IS indeed blank, uri.password.s should be initialized to an empty string <code>""</code> instead of NULL so that <code>do_action.c:1032</code> check passes and the current behavior .  But otherwise, if the password is NULL, the colon should not be appended.</p>

<p>This should satisfy the userinfo requirements as well as fix the issue presented.</p>

<p>Thoughts?</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/OpenSIPS/opensips/pull/598'>https://github.com/OpenSIPS/opensips/pull/598</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Do not append colon if uri password is NULL</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/598/files#diff-0">action.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/598.patch'>https://github.com/OpenSIPS/opensips/pull/598.patch</a></li>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/598.diff'>https://github.com/OpenSIPS/opensips/pull/598.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/598">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcif-lH1hSQBtQ9uZlcs_AUkR-S8LWks5omr6NgaJpZM4Fp8rF.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/598"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>