null pointer dereference

This commit is contained in:
Andreas Gustafsson 1999-07-28 05:23:16 +00:00
parent 260b413740
commit 8c55a67a6d

View file

@ -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--;