]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/rplan: check for null name
authorMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 3 Dec 2015 10:37:16 +0000 (11:37 +0100)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Thu, 3 Dec 2015 10:37:16 +0000 (11:37 +0100)
lib/rplan.c

index 2af022044c7d05a50da88a8c9f1cd723721ee23d..db6bad1646a7e69018d2debe865fe2e53789c1dc 100644 (file)
@@ -146,6 +146,8 @@ int kr_rplan_pop(struct kr_rplan *rplan, struct kr_query *qry)
 
 bool kr_rplan_satisfies(struct kr_query *closure, const knot_dname_t *name, uint16_t cls, uint16_t type)
 {
+       if (!name)
+               return false;
        while (closure != NULL) {
                if (QUERY_PROVIDES(closure, name, cls, type)) {
                        return true;