commit 7bd6659: [Minor] Fix format string
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Dec 1 19:42:07 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-12-01 19:41:26 +0000
URL: https://github.com/rspamd/rspamd/commit/7bd6659b969b1c183b11fb19437cb46ca5929297 (HEAD -> master)
[Minor] Fix format string
---
src/libserver/spf.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index dd85dfbe5..b33f06c01 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -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) {
More information about the Commits
mailing list