From: Vsevolod Stakhov Date: Tue, 5 Jul 2016 11:37:17 +0000 (+0100) Subject: [Fix] Fix potential NULL dereference X-Git-Tag: 1.3.0~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39fec823f124a82dd6a4bcd06a53a0ff062f4ac0;p=thirdparty%2Frspamd.git [Fix] Fix potential NULL dereference --- diff --git a/contrib/librdns/parse.c b/contrib/librdns/parse.c index e9527eaa4e..a1b25e2ff4 100644 --- a/contrib/librdns/parse.c +++ b/contrib/librdns/parse.c @@ -209,6 +209,11 @@ rdns_parse_labels (struct rdns_resolver *resolver, else if (llen & DNS_COMPRESSION_BITS) { llen = UNCOMPRESS_DNS_OFFSET(p); l = rdns_decompress_label (in, &llen, end - in); + + if (l == NULL) { + goto end; + } + begin = l; length = end - begin; p = l + *l + 1;