diff --git a/src/dnssec.c b/src/dnssec.c index ad34557..3fef946 100644 --- a/src/dnssec.c +++ b/src/dnssec.c @@ -58,7 +58,7 @@ static int extract_name_no_compression(unsigned char *rr, int maxlen, char *buf) while (rr < end && *rr != 0) { count = *rr++; - while (count-- >= 0 && rr < end) + while (count-- > 0 && rr < end) { *buf = *rr++; if (!isascii(*buf) || iscntrl(*buf) || *buf == '.')