<p> Attention is currently required from: N A. </p>
<p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4; color: #000000;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18363">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File channels/chan_iax2.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18363/comment/2e53d70c_358ae230">Patch Set #1, Line 6382:</a> <code style="font-family:monospace,monospace">static int invalid_key(ast_aes_decrypt_key *ecx)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">As it appears 'ecx' is not altered in this function this can be made const if you want.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18363/comment/68b99c86_4fca3398">Patch Set #1, Line 6384:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> int i, c = 0;<br> for (i = 0; i < 60; i++) {<br> if (ecx->rd_key[i]) {<br> break; /* stop if we encounter anything non-zero */<br> }<br> c += ecx->rd_key[i];<br> }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">My eyes may deceive me but this appears to be of no affect on the function, and its result?</p><p style="white-space: pre-wrap; word-wrap: break-word;">'c' seems to be unused, and 'ecx' is not modified in any way?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18363/comment/84cd98d9_23766c9f">Patch Set #1, Line 6391:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> if (!ecx->rd_key[0]) {<br> return -1; /* if ast_aes_encrypt or ast_aes_decrypt is called, then<br> * we'll crash when calling AES_encrypt or AES_decrypt */<br> }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">As this always just checks at the [0] element then I think this can be moved to the beginning of the function to short-circuit other checks.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/18363/comment/0448dc0a_328c25ea">Patch Set #1, Line 8554:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> ast_log(LOG_ERROR, "BUG! Encryption key is completely empty!\n");<br> return -1;<br> } else if (invalid_key(&p->dcx)) {<br> ast_log(LOG_ERROR, "BUG! Decryption key is completely empty!\n");<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should these just be 'ast_assert_return's?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18363">change 18363</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/18363"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: If925c3d86099ceac7f621804f2532baac5050c9a </div>
<div style="display:none"> Gerrit-Change-Number: 18363 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 26 Apr 2022 22:17:27 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>