From aa67fe7a8cd2b8bf1b0ee8f3e4c5513f03f25ebd Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Mon, 4 Feb 2013 21:32:34 +0000 Subject: [PATCH] Catch NULL pointer deref if qdcount == 0 --- src/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth.c b/src/auth.c index a860780..6ad1ecd 100644 --- a/src/auth.c +++ b/src/auth.c @@ -470,7 +470,7 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n } /* Add auth section */ - if (auth) + if (auth && zone) { char *authname; int newoffset, offset = 0;