2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 13:48:06 +00:00

postfix-2.12-20150120

This commit is contained in:
Wietse Venema
2015-01-20 00:00:00 -05:00
committed by Viktor Dukhovni
parent 5c187bc356
commit 3d9384829e
6 changed files with 26 additions and 12 deletions

View File

@@ -21426,3 +21426,10 @@ Apologies for any names omitted.
even when the client did not send any. This helps logfile
analyzers to recognize sessions without commands. File:
smtpd/smtpd.c.
20150120
Bugfix (introduced: 20141230-20140109): do not reallocate
a dictionary handle after it is initialized. This breaks
CDB. Problem reported by Andreas Schulze. Files: util/dict.h,
util/dict_alloc.c, util/dict_utf8.c.

View File

@@ -8,9 +8,18 @@ Wish list:
Things to do after the stable release:
Back out check_dict_get() because the longjmp() calls
introduce memory leaks upstream.
postconf -P: emit '{ name = value }' when editing/adding a
parameter whose new value contains whitespace.
Fix the ad-hoc lowercase() calls that silently assume an
adress or localpart is ASCII: smtpd/smtpd_resolve.c,
local/forward.c, local/recipient.c, ... Are we supposed to
throw an error when casefold() fails? How do we know that
an error is permanent or just a shortage of resources?
In release-notes add commands=x/y logging to the command
statistics.

View 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 "20150118"
#define MAIL_RELEASE_DATE "20150120"
#define MAIL_VERSION_NUMBER "2.12"
#ifdef SNAPSHOT

View File

@@ -249,6 +249,12 @@ extern void dict_type_override(DICT *, const char *);
/*
* Check and convert UTF-8 keys and values.
*/
typedef struct {
const char *(*lookup) (struct DICT *, const char *);
int (*update) (struct DICT *, const char *, const char *);
int (*delete) (struct DICT *, const char *);
} DICT_UTF8_BACKUP;
extern DICT *dict_utf8_activate(DICT *);
extern char *dict_utf8_check_fold(DICT *, const char *, CONST_CHAR_STAR *);
extern int dict_utf8_check(const char *, CONST_CHAR_STAR *);

View File

@@ -134,7 +134,9 @@ static void dict_default_close(DICT *dict)
DICT *dict_alloc(const char *dict_type, const char *dict_name, ssize_t size)
{
DICT *dict = (DICT *) mymalloc(size);
extern int util_utf8_enable;
DICT *dict = (DICT *) mymalloc(util_utf8_enable ?
size + sizeof(DICT_UTF8_BACKUP) : size);
dict->type = mystrdup(dict_type);
dict->name = mystrdup(dict_name);

View File

@@ -70,15 +70,6 @@
#include <mymalloc.h>
#include <msg.h>
/*
* Backed-up accessor function pointers.
*/
typedef struct {
const char *(*lookup) (struct DICT *, const char *);
int (*update) (struct DICT *, const char *, const char *);
int (*delete) (struct DICT *, const char *);
} DICT_UTF8_BACKUP;
/*
* The goal is to maximize robustness: bad UTF-8 should not appear in keys,
* because those are derived from controlled inputs, and values should be
@@ -303,7 +294,6 @@ DICT *dict_utf8_activate(DICT *dict)
* to arbitrary levels of encapsulation. That is, it does not co-exist
* with dict_debug(3) which is broken for the reasons stated above.
*/
dict = myrealloc(dict, dict->size + sizeof(*backup));
backup = (void *) dict + dict->size;
/*