[Asterisk-code-review] stasis.c: Use correct topic name in stasis_topic_pool_delete_topic (asterisk[17])

George Joseph asteriskteam at digium.com
Mon Jan 6 08:16:35 CST 2020


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

Change subject: stasis.c:  Use correct topic name in stasis_topic_pool_delete_topic
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.asterisk.org/c/asterisk/+/13507/1/main/stasis.c 
File main/stasis.c:

https://gerrit.asterisk.org/c/asterisk/+/13507/1/main/stasis.c@1858 
PS1, Line 1858: 	char *temp_topic_name = ast_strdupa(topic_name);
> You aren't modifying topic_name, why is the strdupa necessary?

Yeah I was going to modify it then changed my mind and forgot to remove the strdupa.


https://gerrit.asterisk.org/c/asterisk/+/13507/1/main/stasis.c@1859 
PS1, Line 1859: 	int pool_topic_name_len = strlen(stasis_topic_name(pool->pool_topic)); /* Safe */
> What does 'Safe' mean here? That stasis_topic_name() will not return NULL?
and that it will always return an NULL terminated string so there's no chance of an overflow.



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

Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: I4396aa69dd83e4ab84c5b91b39293cfdbcf483e6
Gerrit-Change-Number: 13507
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Mon, 06 Jan 2020 14:16:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200106/7348a3a0/attachment.html>


More information about the asterisk-code-review mailing list