From: TCY16 Date: Fri, 26 Nov 2021 14:35:53 +0000 (+0100) Subject: add error in case of incorrect string for local-zone-default-ede X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff356b940bc07a612555ea6b66ca39e51150c49d;p=thirdparty%2Funbound.git add error in case of incorrect string for local-zone-default-ede --- diff --git a/services/localzone.c b/services/localzone.c index d87c905e8..6c284bed1 100644 --- a/services/localzone.c +++ b/services/localzone.c @@ -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))