mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix SEGV and failure to validate on x86_64.
This commit is contained in:
@@ -461,7 +461,7 @@ static void sort_rrset(struct dns_header *header, size_t plen, u16 *rr_desc, int
|
||||
|
||||
rc = memcmp(buff1, buff2, len);
|
||||
|
||||
if (rc == 1 || (rc == 0 && quit && len1 > len2))
|
||||
if (rc > 0 || (rc == 0 && quit && len1 > len2))
|
||||
{
|
||||
unsigned char *tmp = rrset[i+1];
|
||||
rrset[i+1] = rrset[i];
|
||||
|
||||
@@ -1476,6 +1476,7 @@ static struct frec *allocate_frec(time_t now)
|
||||
#endif
|
||||
#ifdef HAVE_DNSSEC
|
||||
f->blocking_query = NULL;
|
||||
f->stash = NULL;
|
||||
#endif
|
||||
daemon->frec_list = f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user