Fix log line corruption for DKIM status
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 13 Jun 2017 15:36:44 +0000 (17:36 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Wed, 28 Jun 2017 09:18:04 +0000 (11:18 +0200)
(cherry picked from commit 31323b30449a59713ed7a99f86e356cb1b9d0fb7)

src/src/dkim.c

index f644fbfdd87346e7b3dacc69d8dcbd16c90e5fc9..044ee3e28b63aa9638841fcfdc46aaa0875675ac 100644 (file)
@@ -169,12 +169,12 @@ for (sig = dkim_signatures; sig; sig = sig->next)
                : sig->algo == PDKIM_ALGO_RSA_SHA1 ? "rsa-sha1" : "err",
        string_sprintf(" b=%d",
                        (int)sig->sighash.len > -1 ? sig->sighash.len * 8 : 0));
-  if ((s= sig->identity)) string_append(logmsg, &size, &ptr, 2, " i=", s);
-  if (sig->created > 0) string_append(logmsg, &size, &ptr, 1,
+  if ((s= sig->identity)) logmsg = string_append(logmsg, &size, &ptr, 2, " i=", s);
+  if (sig->created > 0) logmsg = string_append(logmsg, &size, &ptr, 1,
                                      string_sprintf(" t=%lu", sig->created));
-  if (sig->expires > 0) string_append(logmsg, &size, &ptr, 1,
+  if (sig->expires > 0) logmsg = string_append(logmsg, &size, &ptr, 1,
                                      string_sprintf(" x=%lu", sig->expires));
-  if (sig->bodylength > -1) string_append(logmsg, &size, &ptr, 1,
+  if (sig->bodylength > -1) logmsg = string_append(logmsg, &size, &ptr, 1,
                                      string_sprintf(" l=%lu", sig->bodylength));
 
   switch (sig->verify_status)