]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
add error in case of incorrect string for local-zone-default-ede
authorTCY16 <tom@nlnetlabs.nl>
Fri, 26 Nov 2021 14:35:53 +0000 (15:35 +0100)
committerTCY16 <tom@nlnetlabs.nl>
Fri, 26 Nov 2021 14:35:53 +0000 (15:35 +0100)
services/localzone.c

index d87c905e88310498416edf5612ec95b5096c47f6..6c284bed14cc63229bfab3c73b131f75d500e173 100644 (file)
@@ -784,6 +784,12 @@ lz_enter_default_ede_response(struct local_zones* zones, char* zname, char* code
        /* parse option in case of a textual string or integer value */
        if (atoi(code) != 0)
                default_ede = (int) ede_string_to_sldns_ede_code(code);
+               if (default_ede == -1) {
+                       log_err("incorect EDE code string found for "
+                                       "local-zone-default-ede: %s", zname);
+                       return 0;
+               }
+
        else {
                int tmp = atoi(code);
                if (!(tmp >= 0 && tmp < 65635))