From: W.C.A. Wijngaards Date: Thu, 20 Jul 2023 10:16:24 +0000 (+0200) Subject: - For #909: Fix RR class comparison. X-Git-Tag: release-1.18.0rc1~24^2~7^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d45c1592ba4cca713b7cc9dbae6f2f72d13f75c;p=thirdparty%2Funbound.git - For #909: Fix RR class comparison. --- diff --git a/doc/Changelog b/doc/Changelog index 1f788f683..206963cfc 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,9 @@ CLASSXX representation. - For #909: Fix return values. +20 July 2023: Wouter + - For #909: Fix RR class comparison. + 14 July 2023: George - More clear description of the different auth-zone behaviors on the man page. diff --git a/sldns/rrdef.c b/sldns/rrdef.c index 55ea2d922..e81ebb1fc 100644 --- a/sldns/rrdef.c +++ b/sldns/rrdef.c @@ -745,7 +745,7 @@ sldns_get_rr_class_by_name(const char *name) /* CLASSXX representation */ if (strlen(name) > 5 && strncasecmp(name, "CLASS", 5) == 0) { unsigned int a = atoi(name + 5); - if (a > LDNS_RR_TYPE_LAST) { + if (a > LDNS_RR_CLASS_LAST) { return (enum sldns_enum_rr_class)0; } return a;