<p>Reported by: dsandras</p>

<blockquote>
<p>About the bound checking error, the code was cut&amp;pasted from another<br>
place in the same file where the same error is still present:<br>
...</p>
</blockquote>

<p>Also I replaced a heap str with a stack one in build_dialoginfo. This<br>
one wasn't freed either unless an error condition was hit.</p>

<hr>

<h4>You can merge this Pull Request by running</h4>
<pre>  git pull https://github.com/wdoekes/opensips wjd-fix_dialogaggr_bounds</pre>
<p>Or view, comment on, or merge it at:</p>
<p>&nbsp;&nbsp;<a href='https://github.com/OpenSIPS/opensips/pull/177'>https://github.com/OpenSIPS/opensips/pull/177</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>presence_dialoginfo: Fix bounds checking by using a helper function.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/177/files#diff-0">modules/presence_dialoginfo/notify_body.c</a>
    (75)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/177.patch'>https://github.com/OpenSIPS/opensips/pull/177.patch</a></li>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/177.diff'>https://github.com/OpenSIPS/opensips/pull/177.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/177'>view it on GitHub</a>.<img src='https://github.com/notifications/beacon/5479561__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMDIzNTg1MiwiZGF0YSI6eyJpZCI6Mjc0OTgxNDZ9fQ==--bcb36c94130a153437e78d35118937ee2b1821e8.gif' height='1' width='1'></p>