]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.7-20210707
authorWietse Venema <wietse@porcupine.org>
Wed, 7 Jul 2021 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Wed, 19 Jan 2022 06:36:07 +0000 (01:36 -0500)
postfix/HISTORY
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_version.h

index 4e60ec2c12c6a0f1761545470041a0760a89b177..9f199119089b0b975f270ceb0a8bf12d5b6d6c91 100644 (file)
@@ -25650,3 +25650,14 @@ Apologies for any names omitted.
        strtou?l() can be migrated later. Problem reported by David
        Bohman. Files: util/sane_strtol.[hc], global/compat_level.c,
        postscreen/postscreen_tests.c, util/mac_expand.c.
+
+20210705
+
+       Bugfix (introduced: Postfix 3.3): with "header_from_format
+       = standard" (the default as of Postfix 3.3) the cleanup
+       daemon crashed with a "null pointer read" error when email
+       was submitted with /usr/sbin/sendmail without From: header,
+       and an all-space full name was specified in the password
+       file, with "sendmail -F", or with the NAME environment
+       variable. Found by Renaud Metrich. File:
+       cleanup/cleanup_message.c.
index 391c7119fe39a03341888c3a13f054b9f802e012..902642f19382eaaa2bb4aef7f3bf699ade905d58 100644 (file)
@@ -776,9 +776,12 @@ static void cleanup_header_done_callback(void *context)
                } else {
                    token = tok822_alloc(TOK822_QSTRING, state->fullname);
                }
-               tok822_externalize(state->temp2, token, TOK822_STR_NONE);
-               tok822_free(token);
-               vstring_sprintf_append(state->temp2, " <%s>",
+               if (token) {
+                   tok822_externalize(state->temp2, token, TOK822_STR_NONE);
+                   tok822_free(token);
+                   vstring_strcat(state->temp2, " ");
+               }
+               vstring_sprintf_append(state->temp2, "<%s>",
                                       vstring_str(state->temp1));
                break;
 
index d7a25e60c94e8db0e08c9e85a923b3e2407fc03a..f4f71a6a1ead5c8766b52a243a37d4e62e064fc4 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20210627"
+#define MAIL_RELEASE_DATE      "20210707"
 #define MAIL_VERSION_NUMBER    "3.7"
 
 #ifdef SNAPSHOT