]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix format string
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 1 Dec 2021 19:41:26 +0000 (19:41 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 1 Dec 2021 19:41:26 +0000 (19:41 +0000)
src/libserver/spf.c

index dd85dfbe57ff8c2b0544da6e806855594be50e44..b33f06c01282412ba5b799ea02fba57b4f6ce314 100644 (file)
@@ -859,9 +859,17 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
        if (reply->flags & RDNS_TRUNCATED) {
                /* Do not process truncated DNS replies */
                truncated = true;
-               msg_warn_spf ("got a truncated record when trying to resolve %s (%s type) for SPF domain %s",
-                               req_name, rdns_str_from_type (req_name->type),
-                               rec->sender_domain);
+
+               if (req_name) {
+                       msg_warn_spf ("got a truncated record when trying to resolve %s (%s type) for SPF domain %s",
+                                       req_name->name, rdns_str_from_type(req_name->type),
+                                       rec->sender_domain);
+               }
+               else {
+                       msg_warn_spf ("got a truncated record when trying to resolve ??? "
+                                                 "(internal error) for SPF domain %s",
+                                       rec->sender_domain);
+               }
        }
 
        if (reply->code == RDNS_RC_NOERROR && !truncated) {