<p><a href="https://gerrit.asterisk.org/c/asterisk/+/11145">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/11145/1/res/stasis/control.c">File res/stasis/control.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/11145/1/res/stasis/control.c@466">Patch Set #1, Line 466:</a> <code style="font-family:monospace,monospace">       move_data->app_args = move_data->app_name + strlen(app_name) + 1;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Could you move this into the `if (app_args) {}` block below?  This would make the code easier to read and avoid a false positive for pointing to memory past the allocation.</p><p style="white-space: pre-wrap; word-wrap: break-word;">You could then remove the `else { move_data->app_args = NULL; }` as the variable would still be NULL from ast_calloc.  This part matters less to me though, unnecessarily NULL'ing a field that is already NULL doesn't raise a red flag.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11145">change 11145</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/+/11145"/><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: I1e4d37415f3034abe36496dc30209c2303e6af5c </div>
<div style="display:none"> Gerrit-Change-Number: 11145 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 13 Mar 2019 13:52:43 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>