[Asterisk-code-review] dns core: Allow zero-length DNS responses. (asterisk[master])

Mark Michelson asteriskteam at digium.com
Thu Jul 30 16:37:12 CDT 2015


Mark Michelson has posted comments on this change.

Change subject: dns_core: Allow zero-length DNS responses.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/985/2/main/dns_core.c
File main/dns_core.c:

Line 402: 	if (!answer) {
> Any issues with also making answer NULL tolerant? It seems weird to require
The idea I had here was that a zero-length answer required no further code changes here since the strcpy() would work fine for a zero-length string. However, allowing NULL input means having to either add special handling for a NULL answer here and potentially other places, or it requires setting answer to an empty string if the parameter was NULL.

I'll update the documentation of ast_dns_resolver_set_result for the next version of this patch.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie56641e22debdaa61459e1c9a042e23b78affbf6
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list