Prereq: "3.2.2" diff -cr --new-file /var/tmp/postfix-3.2.2/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-3.2.2/src/global/mail_version.h 2017-06-13 13:28:36.000000000 -0400 --- ./src/global/mail_version.h 2017-09-24 08:21:50.000000000 -0400 *************** *** 20,27 **** * 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" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE --- 20,27 ---- * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20170924" ! #define MAIL_VERSION_NUMBER "3.2.3" #ifdef SNAPSHOT #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -cr --new-file /var/tmp/postfix-3.2.2/HISTORY ./HISTORY *** /var/tmp/postfix-3.2.2/HISTORY 2017-06-13 13:30:40.000000000 -0400 --- ./HISTORY 2017-09-24 08:30:07.000000000 -0400 *************** *** 22992,22994 **** --- 22992,23016 ---- 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. diff -cr --new-file /var/tmp/postfix-3.2.2/src/global/mail_addr_crunch.c ./src/global/mail_addr_crunch.c *** /var/tmp/postfix-3.2.2/src/global/mail_addr_crunch.c 2017-01-27 17:36:22.000000000 -0500 --- ./src/global/mail_addr_crunch.c 2017-06-20 19:40:44.000000000 -0400 *************** *** 120,126 **** 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) { VSTRING_SPACE(intern_addr, extlen + 1); if ((ratsign = strrchr(STR(intern_addr), '@')) == 0) { vstring_strcat(intern_addr, extension); --- 120,126 ---- 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) { VSTRING_SPACE(intern_addr, extlen + 1); if ((ratsign = strrchr(STR(intern_addr), '@')) == 0) { vstring_strcat(intern_addr, extension); diff -cr --new-file /var/tmp/postfix-3.2.2/src/util/vbuf_print.c ./src/util/vbuf_print.c *** /var/tmp/postfix-3.2.2/src/util/vbuf_print.c 2017-01-01 10:58:50.000000000 -0500 --- ./src/util/vbuf_print.c 2017-09-24 08:28:43.000000000 -0400 *************** *** 106,112 **** #ifndef NO_SNPRINTF #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ ssize_t _ret; \ ! VBUF_SPACE((bp), (sz)); \ _ret = snprintf((char *) (bp)->ptr, (bp)->cnt, (fmt), (arg)); \ if (_ret < 0) \ msg_panic("%s: output error for '%s'", myname, (fmt)); \ --- 106,113 ---- #ifndef NO_SNPRINTF #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ ssize_t _ret; \ ! 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)); \ *************** *** 117,123 **** } while (0) #else #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ ! VBUF_SPACE((bp), (sz)); \ sprintf((char *) (bp)->ptr, (fmt), (arg)); \ VBUF_SKIP(bp); \ } while (0) --- 118,125 ---- } while (0) #else #define VBUF_SNPRINTF(bp, sz, fmt, arg) do { \ ! if (VBUF_SPACE((bp), (sz)) != 0) \ ! return (bp); \ sprintf((char *) (bp)->ptr, (fmt), (arg)); \ VBUF_SKIP(bp); \ } while (0) *************** *** 192,198 **** VSTRING_ADDCH(fmt, *cp++); if (*cp == '*') { /* dynamic field width */ width = va_arg(ap, int); ! VSTRING_ADDNUM(fmt, width); cp++; } else { /* hard-coded field width */ for (width = 0; ch = *cp, ISDIGIT(ch); cp++) { --- 194,205 ---- VSTRING_ADDCH(fmt, *cp++); if (*cp == '*') { /* dynamic field width */ width = va_arg(ap, int); ! 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,216 **** VSTRING_ADDCH(fmt, *cp++); if (*cp == '*') { /* dynamic precision */ prec = va_arg(ap, int); ! VSTRING_ADDNUM(fmt, prec); cp++; } else { /* hard-coded precision */ for (prec = 0; ch = *cp, ISDIGIT(ch); cp++) { --- 217,228 ---- VSTRING_ADDCH(fmt, *cp++); if (*cp == '*') { /* dynamic precision */ prec = va_arg(ap, int); ! 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++) {