Commit Diff


commit - f5286ea3aa39c8294713b86bd5e283245349e9ea
commit + b6e37a5eeac178c8d2423aef719ca60a89b6b6dc
blob - d182879adf1a9824bfc75aef03796845e23c89b6
blob + ad535ff8f8ec2d42b09469ab4cfab91b0bce33c0
--- main.c
+++ main.c
@@ -483,7 +483,7 @@ dkim_parse_header(struct dkim_session *session, char *
 	size_t linelen;
 	size_t lastheader;
 	size_t hlen;
-	int fieldname;
+	int fieldname = 0;
 	char **mtmp;
 	char *htmp;
 
@@ -506,7 +506,8 @@ dkim_parse_header(struct dkim_session *session, char *
 	}
 
 	if (canonheader == CANON_RELAXED) {
-		fieldname = 1;
+		if (!session->lastheader)
+			fieldname = 1;
 		for (r = w = 0; line[r] != '\0'; r++) {
 			if (line[r] == ':' && fieldname) {
 				if (line[w - 1] == ' ')