[Asterisk-code-review] app_read: Fix null pointer crash (asterisk[16])

N A asteriskteam at digium.com
Wed Sep 29 13:32:27 CDT 2021


Attention is currently required from: Sean Bright.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16548 )

Change subject: app_read: Fix null pointer crash
......................................................................


Patch Set 2:

(3 comments)

File apps/app_read.c:

https://gerrit.asterisk.org/c/asterisk/+/16548/comment/71e33e96_8ae9f6f4 
PS1, Line 157: 	char *terminator = NULL; /* use default terminator # by default */
> Change this to: […]
The # is defaulted in app.c, so this would break that abstraction. If the default were changed, now it would need to be changed in multiple places.


https://gerrit.asterisk.org/c/asterisk/+/16548/comment/42d7ed49_460d965f 
PS1, Line 216: 		if (!ast_strlen_zero(arglist.filename)) {
> Why are we checking arglist. […]
That is a separate bug, thanks for pointing that out. Copy/paste error.


https://gerrit.asterisk.org/c/asterisk/+/16548/comment/58f0bbdb_de81530a 
PS1, Line 253: 					if (terminator && strchr(terminator, tmp[x-1])) {
> This change is no longer necessary if you set terminator to # at declaration time.
Right, but I think that would break the abstraction which was already designed in. So then we'd need to go back and modify app.c. It should've been checking terminator in the first place, I just forgot about that at the time.



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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ie941833e123c3dbfb88371b5de5edbbe065514ac
Gerrit-Change-Number: 16548
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Sean Bright <sean at seanbright.com>
Gerrit-Comment-Date: Wed, 29 Sep 2021 18:32:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210929/aa5c1987/attachment.html>


More information about the asterisk-code-review mailing list