From 8c55a67a6d185de7036e39da30561a5c1637d22b Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 28 Jul 1999 05:23:16 +0000 Subject: [PATCH] null pointer dereference --- lib/dns/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns/message.c b/lib/dns/message.c index 6f5f86149f..570b312f9b 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -118,7 +118,7 @@ msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) { void *ptr; - if (block->remaining == 0) + if (block == NULL || block->remaining == 0) return (NULL); block->remaining--;