소스 검색

Make sure len is always 0 in header callback

This will protect us from any changes to parse_address() that fails to
set len properly.

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
David Goulet 6 년 전
부모
커밋
c361cd7bd2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      milterfrom.c

+ 1 - 1
milterfrom.c

@@ -133,7 +133,7 @@ sfsistat mlfi_header(SMFICTX *ctx, char *headerf, char *headerv)
 	// Perform checks if the sender is authenticated and the message is not rejected yet (the mail may contain multiple from tags, all have to match!).
 	if (priv->is_auth && !priv->reject) {
 		if (strcasecmp(headerf, "from") == 0) {
-			int len;
+			int len = 0;
 			const char *from = parse_address(headerv, &len);
 
 			// Check whether header from matches envelope from and reject if not.