Fix SEGV and failure to validate on x86_64.

This commit is contained in:
Simon Kelley
2014-01-16 19:53:06 +00:00
parent 0975a58e9b
commit 4619d94622
2 changed files with 3 additions and 2 deletions

View File

@@ -461,7 +461,7 @@ static void sort_rrset(struct dns_header *header, size_t plen, u16 *rr_desc, int
rc = memcmp(buff1, buff2, len); 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]; unsigned char *tmp = rrset[i+1];
rrset[i+1] = rrset[i]; rrset[i+1] = rrset[i];

View File

@@ -1476,6 +1476,7 @@ static struct frec *allocate_frec(time_t now)
#endif #endif
#ifdef HAVE_DNSSEC #ifdef HAVE_DNSSEC
f->blocking_query = NULL; f->blocking_query = NULL;
f->stash = NULL;
#endif #endif
daemon->frec_list = f; daemon->frec_list = f;
} }