Commit Diff


commit - 6e04c3ca399f1d339bf15f397339bc6aba327694
commit + 503597cced5ec7027795c98ad2c00d270cd83f82
blob - a7a82037020642e9a0002a210b1a9348a35b2dfe
blob + 57685a5a37a9d49c339fff93d8be081e304d8688
--- main.c
+++ main.c
@@ -717,7 +717,7 @@ dkim_signature_need(struct dkim_session *session, size
 
 	if (sig->len + len < sig->size)
 		return 1;
-	sig->size = (((len + sig->len - sig->size) / 512) + 1) * 512;
+	sig->size = (((len + sig->len) / 512) + 1) * 512;
 	if ((tmp = realloc(sig->signature, sig->size)) == NULL) {
 		dkim_err(session, "No room for signature");
 		return 0;