int len = base32hex_decode(nsec3_name + 1, nsec3_name[0], val.data + val.len,
KR_CACHE_KEY_MAXLEN - val.len);
if (len != NSEC3_HASH_LEN) {
- assert(false); // FIXME: just debug, possible bogus input in real life
return VAL_EMPTY;
}
val.len += len;
const uint8_t *hash_next = next_rdata + nsec_p_rdlen(next_rdata)
+ sizeof(uint8_t) /* hash length from rfc5155 */;
if (hash_next[-1] != NSEC3_HASH_LEN) {
- assert(false); // FIXME: just debug, possible bogus input in real life
return "unexpected next hash length";
}
/* B. do the actual range check. */
* records on that answer index (unsuccessful attempts). */
knot_dname_t owner[KNOT_DNAME_MAXLEN];
int ret = dname_wire_reconstruct(owner, k->zname, hash_low);
- if (unlikely(ret)) {
- assert(false); // FIXME: just debug, possible long zname in real life
- continue;
- }
+ if (unlikely(ret)) continue;
const int ans_id = (exact_match && name_labels + 1 == last_nxproven_labels)
? AR_CPE : AR_NSEC;
{
knot_dname_t owner[KNOT_DNAME_MAXLEN];
{
int ret = dname_wire_reconstruct(owner, k->zname, hash_low);
- if (unlikely(ret)) {
- assert(false); // FIXME: just debug, possible long zname in real life
- return kr_ok();
- }
+ if (unlikely(ret)) return kr_ok();
const struct entry_h *nsec_eh = val.data;
const void *nsec_eh_bound = val.data + val.len;
ret = entry2answer(ans, AR_WILD, nsec_eh, nsec_eh_bound,