<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2071/">https://reviewboard.asterisk.org/r/2071/</a>
     </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers and rmudgett.</div>
<div>By Mark Michelson.</div>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This contains several fixes involving the misuse of asprintf()

* All uses of asprintf() have been changed to ast_asprintf() and all uses of vasprintf() have been changed to ast_vasprintf(). This is because these are typically paired with calls to ast_free(). When using MALLOC_DEBUG, we must pair ast_ allocation calls with ast_free() or else unfun things happen.

* All uses of ast_asprintf() are now checked for failure. The biggest offender here was xmldoc.c. If there are errors in this review, this is the most likely file to find them.

* Any failure cases of ast_asprintf() that result in the allocated memory being potentially referenced later now explicitly NULLs out the pointer because asprintf() does not define what the pointer will be pointing to after an allocation failure.

* Fixed a memory leak in res_config_sqlite3 where an ast_asprintf() call did not have the resultant allocated memory freed.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Compiled, ran Asterisk, and ran some calls. Nothing catastrophic occurred.</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-20135">ASTERISK-20135</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/branches/1.8/apps/app_dial.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/apps/app_queue.c <span style="color: grey">(371141)</span></li>

 <li>/branches/1.8/apps/app_stack.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/cdr/cdr_tds.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/channels/chan_dahdi.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/channels/chan_oss.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/channels/chan_sip.c <span style="color: grey">(371198)</span></li>

 <li>/branches/1.8/funcs/func_odbc.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/main/file.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/main/utils.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/main/xmldoc.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/pbx/pbx_config.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/res/res_config_sqlite.c <span style="color: grey">(370766)</span></li>

 <li>/branches/1.8/res/res_jabber.c <span style="color: grey">(370766)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2071/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>