]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix potential NULL dereference
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jul 2016 11:37:17 +0000 (12:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jul 2016 11:37:17 +0000 (12:37 +0100)
contrib/librdns/parse.c

index e9527eaa4ea70e01e6032953edcbb9b7ff41fd1e..a1b25e2ff4a0bf20c7095212e502ba7a2f6b1876 100644 (file)
@@ -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;