<p> Attention is currently required from: Benjamin Keith Ford. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/16497">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File include/asterisk/res_stir_shaken.h:</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/+/16497/comment/54f7a3e4_5d2cf42a">Patch Set #3, Line 94:</a> <code style="font-family:monospace,monospace">int ast_stir_shaken_verify(const char *header, const char *payload, const char *signature, const char *algorithm,</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yeah, I'm not sure what to do about this honestly. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You have to leave the old function call, and create a whole new one. Then in your .c file you have one call the other, or both call shared code. The old function still returning what it always has.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If more parameters need to be added in the future then you either have to:</p><p style="white-space: pre-wrap; word-wrap: break-word;">1) create other function call(s) for those later, or<br>2) if you know for sure they'll be added then add them now to this new one and they'll essentially be noop  (saved for future use) until the code changes later. Or,<br>3) create a params and/or results structure to pass in and/or return that contains the values you need. Future expansion can then be done to the end of that structure without changing the function definition.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="null">File res/res_pjsip_stir_shaken.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/+/16497/comment/d53bb36b_4eefc410">Patch Set #3, Line 129:</a> <code style="font-family:monospace,monospace">        date_hdr_val = ast_sip_rdata_get_header_value(rdata, date_hdr_str);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">At the end of that function, the string is duplicated with null termination via pj_strdup_with_null, […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Oh ya I missed the dupe part in that function. That's an unusual way to do such, but I suppose it works as long as rdata's pool stays valid, which it appears to be the case in these instances.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/16497/comment/12e423f4_381d7a44">Patch Set #3, Line 140:</a> <code style="font-family:monospace,monospace">        sscanf(remainder, "%79s", timezone);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This was actually snatched from pbx.c. It's possible timezone could be an empty string. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Yeah I believe checking the result is sufficient, and something you'd want to do either way.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Alternatively, you could check if timezone is empty prior to sscanf, and skip if so.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16497">change 16497</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/+/16497"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I4ac1ecf652cd0e336006b0ca638dc826b5b1ebf7 </div>
<div style="display:none"> Gerrit-Change-Number: 16497 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Attention: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 27 Sep 2021 15:33:33 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Comment-In-Reply-To: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>