[Asterisk-code-review] acl: implement a centralized ACL output mechanism for HAs and ACLs. (asterisk[13])
Kevin Harwell
asteriskteam at digium.com
Wed Mar 25 15:40:29 CDT 2020
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13951 )
Change subject: acl: implement a centralized ACL output mechanism for HAs and ACLs.
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
I realize my finding is part of legacy code, but probably good to fix while changing anyway.
https://gerrit.asterisk.org/c/asterisk/+/13951/1/main/acl.c
File main/acl.c:
https://gerrit.asterisk.org/c/asterisk/+/13951/1/main/acl.c@1093
PS1, Line 1093: char *addr = ast_strdupa(ast_sockaddr_stringify_addr(&ha->addr));
ast_strdupa uses "alloca", which stack allocates memory and should not be used in a loop. Replace this with a static or dynamic array, or the heap allocated version ast_strdup (which will require freeing the string).
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13951
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I0ec9876a90dddd379c80ec078d48e3ee6991eb0f
Gerrit-Change-Number: 13951
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Wed, 25 Mar 2020 20:40:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200325/a68f89be/attachment-0001.html>
More information about the asterisk-code-review
mailing list