[Asterisk-code-review] dns core: Protect against array index violation. (asterisk[15])

Richard Mudgett asteriskteam at digium.com
Tue Dec 19 13:28:53 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7667 )

Change subject: dns_core: Protect against array index violation.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/7667/1/main/dns_core.c
File main/dns_core.c:

https://gerrit.asterisk.org/#/c/7667/1/main/dns_core.c@450
PS1, Line 450: static struct ast_dns_record *allocate_dns_record(int rr_type, struct ast_dns_query *query, const char *data, const size_t size)
> This is a static function and the caller already tests for rr_type < 0.  Ho
An assert will work since there is only one caller.  Changing the type would always work without adding any additional code.



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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2f6e4991cea46baa12e837bd64cc22b44d322bb
Gerrit-Change-Number: 7667
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 19 Dec 2017 19:28:53 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/e635c4f0/attachment-0001.html>


More information about the asterisk-code-review mailing list