From: John Crispin Date: Wed, 27 Aug 2014 17:51:07 +0000 (+0200) Subject: fix potential null pointer deref when packets are forged X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=5896be28e9608800083fb14fbb56dffe932c5d46;ds=sidebyside fix potential null pointer deref when packets are forged Signed-off-by: John Crispin --- diff --git a/cache.c b/cache.c index cdc4a79..812478e 100644 --- a/cache.c +++ b/cache.c @@ -167,7 +167,7 @@ cache_record_find(char *record, int type, int port, int rdlength, uint8_t *rdata if (!l) return NULL; - while (l && !strcmp(l->record, record)) { + while (l && l->record && !strcmp(l->record, record)) { struct cache_record *r = l; l = avl_next_element(l, avl);