PATCH: Postfix >= 20020610 loops on malformed address

[email protected] (Wietse Venema) Sat, 13 Jul 2002 20:48:37 -0400 (EDT)
Newsgroups gmane.mail.postfix.announce
Message-ID <[email protected]>
Postfix experimental release postfix-1.1.11-20020610 introduced a
bug in the trivial-rewrite daemon, so that addresses consisting
solely of @ and . characters caused the Postfix address resolver
client to loop while logging a warning message every 10 seconds.

The patch below undoes the change that caused the problem.

	Wietse

*** ./src/trivial-rewrite/resolve.c-	Mon Jun 10 19:27:40 2002
--- ./src/trivial-rewrite/resolve.c	Sat Jul 13 20:31:42 2002
***************
*** 193,199 ****
  	if (saved_domain) {
  	    tok822_sub_append(tree, saved_domain);
  	    saved_domain = 0;
! 	} else if (tree->head) {
  	    tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
  	    tok822_sub_append(tree, tok822_scan(var_myhostname, (TOK822 **) 0));
  	}
--- 193,199 ----
  	if (saved_domain) {
  	    tok822_sub_append(tree, saved_domain);
  	    saved_domain = 0;
! 	} else {
  	    tok822_sub_append(tree, tok822_alloc('@', (char *) 0));
  	    tok822_sub_append(tree, tok822_scan(var_myhostname, (TOK822 **) 0));
  	}