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)
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);