From e24abf28a29574069717af78c1d3e0ede64388ff Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Tue, 3 Sep 2019 22:48:39 +0100 Subject: [PATCH] Fix botch in ae7a3b9d2e8705af203a1347c397718a24331747 Loop variable must count up from zero, now we're using it as an array index. --- src/dnssec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dnssec.c b/src/dnssec.c index 92aa664..7ec7edc 100644 --- a/src/dnssec.c +++ b/src/dnssec.c @@ -1532,7 +1532,7 @@ static int prove_non_existence(struct dns_header *header, size_t plen, char *key auth_start = p; - for (nsecs_found = 0, i = ntohs(header->nscount); i != 0; i--) + for (nsecs_found = 0, i = 0; i < ntohs(header->nscount); i++) { unsigned char *pstart = p;