aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/librdns
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-05 12:37:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-07-05 12:37:17 +0100
commit39fec823f124a82dd6a4bcd06a53a0ff062f4ac0 (patch)
tree06b01b4a5bf657c17fb74a9e34106c96697d0c43 /contrib/librdns
parent3a43269d6f8eee01c2bac1b9feeb037fad562725 (diff)
downloadrspamd-39fec823f124a82dd6a4bcd06a53a0ff062f4ac0.tar.gz
rspamd-39fec823f124a82dd6a4bcd06a53a0ff062f4ac0.zip
[Fix] Fix potential NULL dereference
Diffstat (limited to 'contrib/librdns')
-rw-r--r--contrib/librdns/parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/librdns/parse.c b/contrib/librdns/parse.c
index e9527eaa4..a1b25e2ff 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;