]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] One more safety check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Jul 2021 13:15:37 +0000 (14:15 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 26 Jul 2021 13:15:37 +0000 (14:15 +0100)
contrib/librdns/resolver.c

index 6036c74a8c7f195486712b9bf727a3721d6bb991..6e3792f7e035dcce35d15777dea487c90eb8b5e2 100644 (file)
@@ -150,7 +150,13 @@ rdns_make_reply (struct rdns_request *req, enum dns_rcode rcode)
                rep->code = rcode;
                req->reply = rep;
                rep->authenticated = false;
-               rep->requested_name = req->requested_names[0].name;
+
+               if (req) {
+                       rep->requested_name = req->requested_names[0].name;
+               }
+               else {
+                       rep->requested_name = NULL;
+               }
        }
 
        return rep;