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

Richard Mudgett asteriskteam at digium.com
Tue Dec 19 13:09:45 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: Code-Review-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)
To be pedantic, negative values of rr_type will also access outside of the array.  Simply change rr_type to unsigned int or test for non-negative values.



-- 
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: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Tue, 19 Dec 2017 19:09:45 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/41c3525a/attachment.html>


More information about the asterisk-code-review mailing list