[Asterisk-code-review] res pjsip/res pjsip callerid: NULL check on caller id name s... (asterisk[13])

Kevin Harwell asteriskteam at digium.com
Wed Apr 26 15:18:28 CDT 2017


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/5541 )

Change subject: res_pjsip/res_pjsip_callerid: NULL check on caller id name string
......................................................................


Patch Set 1:

>So I would expect that if 'valid' is 1 than 'str' would be non-NULL.
>Would it make more sense to audit the places that we set 'valid' to 1 to ensure that 'str' is set to the empty string if it is NULL?

I thought the same at first, but looking through the code checking for NULL is not unprecedented for this, so I assume it is valid. Even if it is not suppose to be, there is one case where it will always be possible. The user via the dialplan can set the valid flag while setting the name itself to NULL. They may do this to clear the value, so we should always be checking for NULL because of this.

-- 
To view, visit https://gerrit.asterisk.org/5541
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa6ffe9d92f598fe9e3c8ae373fadbe3dfbf1d4a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-HasComments: No



More information about the asterisk-code-review mailing list