diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2010-01-26 04:17:18 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2010-01-26 04:17:18 +0000 |
commit | a8454492fdd0eb5a005ff8ef52fad69f43baffe2 (patch) | |
tree | 25902a53d874255d42002dd157e36601e71e2df5 /src/usersmtp.c | |
parent | 3fcf33f21197c2c6b7eb494f7b6d5737cb7a492c (diff) | |
download | FreeBSD-src-a8454492fdd0eb5a005ff8ef52fad69f43baffe2.zip FreeBSD-src-a8454492fdd0eb5a005ff8ef52fad69f43baffe2.tar.gz |
Import sendmail 8.14.4
Diffstat (limited to 'src/usersmtp.c')
-rw-r--r-- | src/usersmtp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/usersmtp.c b/src/usersmtp.c index b29495c..23278b0 100644 --- a/src/usersmtp.c +++ b/src/usersmtp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: usersmtp.c,v 8.472 2008/01/31 18:48:29 ca Exp $") +SM_RCSID("@(#)$Id: usersmtp.c,v 8.473 2009/06/17 17:26:51 ca Exp $") #include <sysexits.h> @@ -1568,7 +1568,9 @@ attemptauth(m, mci, e, sai) sasl_interact_t *client_interact = NULL; char *mechusing; sasl_security_properties_t ssp; - char in64[MAXOUTLEN]; + + /* MUST NOT be a multiple of 4: bug in some sasl_encode64() versions */ + char in64[MAXOUTLEN + 1]; #if NETINET || (NETINET6 && SASL >= 20000) extern SOCKADDR CurHostAddr; #endif /* NETINET || (NETINET6 && SASL >= 20000) */ @@ -1770,7 +1772,8 @@ attemptauth(m, mci, e, sai) } else { - saslresult = sasl_encode64(out, outlen, in64, MAXOUTLEN, NULL); + saslresult = sasl_encode64(out, outlen, in64, sizeof(in64), + NULL); if (saslresult != SASL_OK) /* internal error */ { if (LogLevel > 8) @@ -1837,7 +1840,7 @@ attemptauth(m, mci, e, sai) if (outlen > 0) { saslresult = sasl_encode64(out, outlen, in64, - MAXOUTLEN, NULL); + sizeof(in64), NULL); if (saslresult != SASL_OK) { /* give an error reply to the other side! */ |