]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.2.3 v3.2.3
authorWietse Venema <wietse@porcupine.org>
Sun, 24 Sep 2017 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Tue, 26 Sep 2017 18:00:51 +0000 (14:00 -0400)
postfix/HISTORY
postfix/src/global/mail_addr_crunch.c
postfix/src/global/mail_version.h
postfix/src/util/vbuf_print.c

index 9a8d3c4f629b57af9692a50735469cd93f9e503c..53d021af1dc8d1ef69d92a53a0e0a309b4e31510 100644 (file)
@@ -22992,3 +22992,25 @@ Apologies for any names omitted.
        by other users. This fix does not change Postfix behavior
        for Berkeley DB < 3, but reduces file create performance
        for Berkeley DB 3 .. 4.6.  File: util/dict_db.c.
+
+20170620
+
+       Bugfix (introduced: Postfix 3.2) extension propagation was
+       broken with "recipient_delimiter = .". This change reverts
+       a change that was trying to be too clever. Files:
+       global/mail_adr_crunch.c, global/mail_addr_crunch.ref.
+
+20170910
+
+       Safety: restore sanity checks for dynamically-specified
+       width and precision in format strings (%*, %.*, and %*.*).
+       These checks were lost with the Postfix 3.2.2 rewrite of
+       the vbuf_print formatter. File: vbuf_print.c.
+
+20170923
+
+       Bugfix (introduced: Postfix 3.2): panic in the postqueue
+       command after output write error while listing the queue.
+       This change restores a write error check that was lost with
+       the Postfix 3.2.2 rewrite of the vbuf_print formatter.
+       Problem reported by Andreas Schulze. File: util/vbuf_print.c.
index 7ca7c0c9ccc648923fef99fafa39ec0490120944..006d322b45985e72e6f48f29624456af622d9bb9 100644 (file)
@@ -120,7 +120,7 @@ ARGV   *mail_addr_crunch_opt(const char *string, const char *extension,
        tok822_externalize(extern_addr, tpp[0]->head, TOK822_STR_DEFL);
        canon_addr_external(canon_addr, STR(extern_addr));
        unquote_822_local(intern_addr, STR(canon_addr));
-       if (extension && strchr(STR(intern_addr), *extension) == 0) {
+       if (extension) {
            VSTRING_SPACE(intern_addr, extlen + 1);
            if ((ratsign = strrchr(STR(intern_addr), '@')) == 0) {
                vstring_strcat(intern_addr, extension);
index eac42079954e514c585139b0935a47a772fb66c0..e1de974af81b1e5d55244060700b665558c76467 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20170613"
-#define MAIL_VERSION_NUMBER    "3.2.2"
+#define MAIL_RELEASE_DATE      "20170924"
+#define MAIL_VERSION_NUMBER    "3.2.3"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 63718ad626821f19c11dbc194e982721259ca082..c0b8d7909c07c48d0b9b855e2522993034326adf 100644 (file)
 #ifndef NO_SNPRINTF
 #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \
        ssize_t _ret; \
-       VBUF_SPACE((bp), (sz)); \
+       if (VBUF_SPACE((bp), (sz)) != 0) \
+           return (bp); \
        _ret = snprintf((char *) (bp)->ptr, (bp)->cnt, (fmt), (arg)); \
        if (_ret < 0) \
            msg_panic("%s: output error for '%s'", myname, (fmt)); \
     } while (0)
 #else
 #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \
-       VBUF_SPACE((bp), (sz)); \
+       if (VBUF_SPACE((bp), (sz)) != 0) \
+           return (bp); \
        sprintf((char *) (bp)->ptr, (fmt), (arg)); \
        VBUF_SKIP(bp); \
     } while (0)
@@ -192,7 +194,12 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                VSTRING_ADDCH(fmt, *cp++);
            if (*cp == '*') {                   /* dynamic field width */
                width = va_arg(ap, int);
-               VSTRING_ADDNUM(fmt, width);
+               if (width < 0) {
+                   msg_warn("%s: bad width %d in %.50s",
+                            myname, width, format);
+                   width = 0;
+               } else
+                   VSTRING_ADDNUM(fmt, width);
                cp++;
            } else {                            /* hard-coded field width */
                for (width = 0; ch = *cp, ISDIGIT(ch); cp++) {
@@ -210,7 +217,12 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                VSTRING_ADDCH(fmt, *cp++);
                if (*cp == '*') {               /* dynamic precision */
                    prec = va_arg(ap, int);
-                   VSTRING_ADDNUM(fmt, prec);
+                   if (prec < 0) {
+                       msg_warn("%s: bad precision %d in %.50s",
+                                myname, prec, format);
+                       prec = -1;
+                   } else
+                       VSTRING_ADDNUM(fmt, prec);
                    cp++;
                } else {                        /* hard-coded precision */
                    for (prec = 0; ch = *cp, ISDIGIT(ch); cp++) {