summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Kistner <tom@duncanthrax.net>2009-10-15 15:44:51 +0000
committerTom Kistner <tom@duncanthrax.net>2009-10-15 15:44:51 +0000
commit0d2b278d077508a1f45a23d2229179731a10d23b (patch)
treedfaa912e8e7cb88b01a68d903bffd0e115a3c96a
parent51cbd3e18b7d2858f6070237f61a0734a8f1fe2c (diff)
Make sure dkim_signers is properly terminated
-rw-r--r--src/src/dkim.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/src/dkim.c b/src/src/dkim.c
index 42b14b5da..eff59df0b 100644
--- a/src/src/dkim.c
+++ b/src/src/dkim.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/dkim.c,v 1.6 2009/10/15 08:27:37 tom Exp $ */
+/* $Cambridge: exim/src/src/dkim.c,v 1.7 2009/10/15 15:44:51 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -201,10 +201,12 @@ void dkim_exim_verify_finish(void) {
sig = sig->next;
}
- /* Chop the last colon from the domain list */
- if ((dkim_signers != NULL) &&
- (Ustrlen(dkim_signers) > 0))
- dkim_signers[Ustrlen(dkim_signers)-1] = '\0';
+ /* NULL-terminate and chop the last colon from the domain list */
+ if (dkim_signers != NULL) {
+ dkim_signers[dkim_signers_ptr] = '\0';
+ if (Ustrlen(dkim_signers) > 0)
+ dkim_signers[Ustrlen(dkim_signers)-1] = '\0';
+ }
}