aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;