]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-20010228-pl05 v20010228-pl05
authorWietse Venema <wietse@porcupine.org>
Mon, 17 Sep 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 15:51:31 +0000 (15:51 +0000)
postfix/HISTORY
postfix/src/global/mail_addr_map.c
postfix/src/global/mail_version.h
postfix/src/global/split_addr.c

index ab2d0fbb550ccb711dbcf0a86c1ee970a74d7b6d..870ad53ef33b5b2dd89ae52b94edc5693b98b9ee 100644 (file)
@@ -5096,3 +5096,16 @@ Apologies for any names omitted.
        of hostnames in $inet_interfaces, so that Postfix does not
        suddenly refuse to start up after someone changes the DNS.
        Files:  util/inet_addr_list.c global/own_inet_addr.c.
+
+20010917
+
+       Bugfix: an address extension could be appended multiple
+       times to the result of a canonical or virtual map lookup.
+       File: global/mail_addr_map.c.  Fix by Victor Duchovni,
+       Morgan Stanley.
+
+       Bugfix: because split_addr() would split an address even
+       when there was no data before the recipient delimiter, the
+       above bug could cause an address to grow exponentially in
+       size.  Problem reported by Victor Duchovni, Morgan Stanley.
+       File:  global/split_addr.c.
index 5146eb080e3e4f2b513fb6d42d5a8cfdcb49c242..8e6932a7b5bcf1821cee27f09708a810142d843e 100644 (file)
@@ -98,6 +98,24 @@ ARGV   *mail_addr_map(MAPS *path, const char *address, int propagate)
                vstring_strcpy(buffer, address);
            vstring_strcat(buffer, string);
            string = STR(buffer);
+
+           /*
+            * The above code copies the address, including address
+            * extension, to the result. Discard the address extension at
+            * this point, to prevent a second address extension copy by
+            * mail_addr_crunch() below.  Fix by Victor Duchovni, Morgan
+            * Stanley.
+            * 
+            * In combination with an obscure bug in the split_addr() routine
+            * that mis-parsed an address without information before the
+            * extension, this could result in the exponential growth of the
+            * size of an address. Problem reported by Victor Duchovni,
+            * Morgan Stanley.
+            */
+           if (extension) {
+               myfree(extension);
+               extension = 0;
+           }
        }
 
        /*
@@ -159,6 +177,7 @@ int     main(int argc, char **argv)
      */
     mail_conf_read();
     msg_verbose = 1;
+    var_rcpt_delim = "+";
     if (chdir(var_queue_dir) < 0)
        msg_fatal("chdir %s: %m", var_queue_dir);
     path = maps_create(argv[0], argv[1], DICT_FLAG_LOCK);
index 4ccf192f8c4e97c7d8b87ff0d955ab185498765e..e1ff53b6d3b7691c2173308edee39515b7d3af25 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Postfix-20010228-pl04"
+#define DEF_MAIL_VERSION       "Postfix-20010228-pl05"
 extern char *var_mail_version;
 
 /* LICENSE
index d9db5777bd66d169003487ff04b1fbf98329f83c..5f5fb4b97b395396871ab185e1e4723e42450229 100644 (file)
@@ -76,7 +76,8 @@ char   *split_addr(char *localpart, int delimiter)
     }
 
     /*
-     * Safe to split this address.
+     * Safe to split this address. Do not split the address if the result
+     * would have a null localpart.
      */
-    return (split_at(localpart, delimiter));
+    return (delimiter == *localpart ? 0 : split_at(localpart, delimiter));
 }