[Asterisk-code-review] various files - fix some alerts raised by lgtm code analysis (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Nov 7 11:18:17 CST 2019


George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13102 )

Change subject: various files - fix some alerts raised by lgtm code analysis
......................................................................


Patch Set 3: Code-Review-1

(6 comments)

https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_playback.c 
File apps/app_playback.c:

https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_playback.c@178 
PS3, Line 178: 	char *lang, *x, *rule = NULL, *rule_head = NULL;
Multiple initializers on the same line.  Don't let Richard see this.


https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c 
File apps/app_voicemail.c:

https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c@1878 
PS3, Line 1878: 					char *value = NULL, *new = NULL;
Multiple initializers on same line.


https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c@1886 
PS3, Line 1886: 						sprintf(new, "%s", newpassword);
need spaces around +1


https://gerrit.asterisk.org/c/asterisk/+/13102/3/channels/chan_motif.c 
File channels/chan_motif.c:

https://gerrit.asterisk.org/c/asterisk/+/13102/3/channels/chan_motif.c@2095 
PS3, Line 2095: 		char *id = iks_find_attrib(codec, "id"), *attr_name = iks_find_attrib(codec, "name");
Multiple initializers.


https://gerrit.asterisk.org/c/asterisk/+/13102/3/main/asterisk.c 
File main/asterisk.c:

https://gerrit.asterisk.org/c/asterisk/+/13102/3/main/asterisk.c@4041 
PS3, Line 4041: 	asterisk_daemon(isroot, runuser, rungroup);
Is it possible that runuser and rungroup could be freed by RAII_VAR before the forked process can use it?


https://gerrit.asterisk.org/c/asterisk/+/13102/3/res/res_pjsip/config_system.c 
File res/res_pjsip/config_system.c:

https://gerrit.asterisk.org/c/asterisk/+/13102/3/res/res_pjsip/config_system.c@86 
PS3, Line 86: sorcery
Do we not actually use this in the function?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13102
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
Gerrit-Change-Number: 13102
Gerrit-PatchSet: 3
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Thu, 07 Nov 2019 17:18:17 +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/20191107/7b97f281/attachment.html>


More information about the asterisk-code-review mailing list