From cdac0460ba50dc45735f0be2e19a5a8efc3dafe1 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Fri, 24 Apr 2020 11:01:12 +0100 Subject: [PATCH] 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 --- dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.25.1