diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2010-11-24 11:09:44 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2010-11-24 11:09:44 +0000 |
commit | 95350a061065e906c08dfa8fe80294d3dc3deabd (patch) | |
tree | 449241d3aade7959730ad0202126dd9f76d3e8ed /usr.sbin/smtpd | |
parent | 3df591cbc1aa4f3ba98cd1b3664552a0d2a6410d (diff) |
we can't accept up to MAX_LOCALPART_SIZE (128 bytes) for the user part
of an email address at session time, then fatal() when we can't fit it
in a LOGIN_NAME_MAX (32 bytes) buffer in the aliases expansion code.
fix aliases functions to use a buffer that's appropriate, preventing a
fatal() from being triggered in aliases_exist(). bug experienced by
and reported by Jason Houx, if you're testing smtpd you want to update.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/aliases.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index 7c0410318dd..ede483d8c21 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.37 2010/10/09 22:05:35 gilles Exp $ */ +/* $OpenBSD: aliases.c,v 1.38 2010/11/24 11:09:43 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -45,7 +45,7 @@ aliases_exist(struct smtpd *env, objid_t mapid, char *username) { struct map *map; struct map_alias *map_alias; - char buf[MAXLOGNAME]; + char buf[MAX_LOCALPART_SIZE]; map = map_find(env, mapid); if (map == NULL) @@ -72,7 +72,7 @@ aliases_get(struct smtpd *env, objid_t mapid, struct expandtree *expandtree, cha struct map *map; struct map_alias *map_alias; struct expandnode *expnode; - char buf[MAXLOGNAME]; + char buf[MAX_LOCALPART_SIZE]; size_t nbaliases; map = map_find(env, mapid); |