diff --git a/src/dnssec.c b/src/dnssec.c index 123a3df..12d8ac3 100644 --- a/src/dnssec.c +++ b/src/dnssec.c @@ -682,18 +682,18 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in return STAT_INSECURE; /* Sort RRset records into canonical order. - Note that at this point keyname and name buffs are + Note that at this point keyname and daemon->workspacename buffs are unused, and used as workspace by the sort. */ - sort_rrset(header, plen, rr_desc, rrsetidx, rrset, name, keyname); + sort_rrset(header, plen, rr_desc, rrsetidx, rrset, daemon->workspacename, keyname); /* Now try all the sigs to try and find one which validates */ for (j = 0; j name_labels || !(hash = hash_find(algo_digest_name(algo))) || @@ -735,13 +760,14 @@ static int validate_rrset(time_t now, struct dns_header *header, size_t plen, in { int seg; unsigned char *end, *cp; - char *name_start = name; u16 len, *dp; - + p = rrset[i]; if (!extract_name(header, plen, &p, name, 1, 10)) return STAT_INSECURE; + name_start = name; + /* if more labels than in RRsig name, hash *. 4035 5.3.2 */ if (labels < name_labels) {