Commit fe6e44fd authored by Marek Vavruša's avatar Marek Vavruša

lib/zonecut: check for parent of root

parent 3e57f56c
......@@ -254,12 +254,12 @@ int kr_zonecut_find_cached(struct kr_context *ctx, struct kr_zonecut *cut, const
/* Start at QNAME parent. */
name = knot_wire_next_label(name, NULL);
while (txn) {
while (txn && name) {
if (fetch_ns(ctx, cut, name, txn, timestamp) == 0) {
update_cut_name(cut, name);
return kr_ok();
}
if (name[0] == '\0') {
if (!name || !name[0]) {
break;
}
/* Subtract label from QNAME. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment