mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-26 16:49:47 -04:00
CLEANUP: dns: remove duplicated code in dns_validate_dns_response()
a reader pointer comparison to the end of the buffer was performed twice while once is obviously enough. backport status: this patch can be backported into HAProxy 1.6 (with some modification. Please contact me)
This commit is contained in:
parent
60e9c264c9
commit
8d11236234
1 changed files with 0 additions and 5 deletions
|
|
@ -1239,11 +1239,6 @@ int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, struct
|
|||
return DNS_RESP_INVALID;
|
||||
}
|
||||
|
||||
if (reader >= bufend) {
|
||||
free_dns_answer_item(dns_answer_record);
|
||||
return DNS_RESP_INVALID;
|
||||
}
|
||||
|
||||
/* 2 bytes for record type (A, AAAA, CNAME, etc...) */
|
||||
if (reader + 2 > bufend) {
|
||||
free_dns_answer_item(dns_answer_record);
|
||||
|
|
|
|||
Loading…
Reference in a new issue