aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/dkim.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-05 16:12:03 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-05 16:12:03 +0000
commitd250836efb7a2a218aa4e9d25d7edcf11c42e389 (patch)
tree588f53a25d05ecf568cc91ed190d385bc76118ea /src/libserver/dkim.c
parentbb727f7e43e6a944a174667cf76806860824691b (diff)
downloadrspamd-d250836efb7a2a218aa4e9d25d7edcf11c42e389.tar.gz
rspamd-d250836efb7a2a218aa4e9d25d7edcf11c42e389.zip
More fixes to dkim \r\n converting.
Found by: @citrin
Diffstat (limited to 'src/libserver/dkim.c')
-rw-r--r--src/libserver/dkim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index 55b7cd331..df06dfe32 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -1102,10 +1102,10 @@ rspamd_dkim_relaxed_body_step (GChecksum *ck, const gchar **start, guint size,
}
if (*remain > 0) {
- size_t cklen = MIN(t - buf, *remain);
+ size_t cklen = MIN(t - buf, *remain + added);
g_checksum_update (ck, buf, cklen);
*remain = *remain - (cklen - added);
-#if 0
+#if 1
msg_debug ("update signature with buffer (%ud size, %ud remain): %*s",
cklen, *remain, cklen, buf);
#endif
@@ -1169,7 +1169,7 @@ rspamd_dkim_simple_body_step (GChecksum *ck, const gchar **start, guint size,
msg_debug ("update signature with buffer: %*s", t - buf, buf);
#endif
if (*remain > 0) {
- size_t cklen = MIN(t - buf, *remain);
+ size_t cklen = MIN(t - buf, *remain + added);
g_checksum_update (ck, buf, cklen);
*remain = *remain - (cklen - added);
}