diff options
author | 2010-11-24 11:09:43 +0000 | |
---|---|---|
committer | 2010-11-24 11:09:43 +0000 | |
commit | ce501bb596c3aeac3daf6e802a39b7ed9a85ac87 (patch) | |
tree | 9d03fc6524868dd0f6a2796c0664ec444f1c7137 | |
parent | remove a debug() that pollutes stderr on client connecting to a server (diff) | |
download | wireguard-openbsd-ce501bb596c3aeac3daf6e802a39b7ed9a85ac87.tar.xz wireguard-openbsd-ce501bb596c3aeac3daf6e802a39b7ed9a85ac87.zip |
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.
-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); |