From: Kevin Darbyshire-Bryant Date: Fri, 24 Apr 2020 10:01:12 +0000 (+0100) Subject: dns.c: fix input validation fix X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cdac0460ba50dc45735f0be2e19a5a8efc3dafe1;p=oweals%2Fmdnsd.git dns.c: fix input validation fix Thanks to Guido Vranken for pointing out I'd forgotten to de-ref a pointer in the previous fix. Signed-off-by: Kevin Darbyshire-Bryant --- diff --git a/dns.c b/dns.c index c64f3b1..1d3362f 100644 --- a/dns.c +++ b/dns.c @@ -318,7 +318,7 @@ static int parse_answer(struct interface *iface, struct sockaddr *from, struct dns_answer *a; uint8_t *rdata; - if (!name || rlen < 0) { + if (!name || *rlen < 0) { fprintf(stderr, "dropping: bad question\n"); return -1; }