From 6445c8ed73ee54b1654eb1da5a0fc468003b61e0 Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Tue, 24 Apr 2012 02:02:29 +0200 Subject: [PATCH] Fix off-by-one in iteration. --- src/dnssec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 == '.')