From 5658c6c561ca13aae18a68f178457245176526fc Mon Sep 17 00:00:00 2001 From: David Levine Date: Mon, 21 Dec 2009 17:18:04 +0000 Subject: [PATCH] * mts/smtp/smtp.c: In sm_auth_sasl (), removed zeroing of sasl_inbuffer because it could be used in sm_fget (). Also, removed allocation of sasl_inbuffer because that was done in either smtp_init () or sendmail_init (). --- ChangeLog | 7 +++++++ mts/smtp/smtp.c | 12 ++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52e56ed..f72df8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-12-21 David Levine + + * mts/smtp/smtp.c: In sm_auth_sasl (), removed zeroing of + sasl_inbuffer because it could be used in sm_fget (). Also, + removed allocation of sasl_inbuffer because that was done in + either smtp_init () or sendmail_init (). + 2009-01-17 Eric Gillespie * etc/mhn.defaults.sh: Never try to make mhshow start xterm. diff --git a/mts/smtp/smtp.c b/mts/smtp/smtp.c index e93a7c2..05e292f 100644 --- a/mts/smtp/smtp.c +++ b/mts/smtp/smtp.c @@ -903,20 +903,12 @@ sm_auth_sasl(char *user, char *mechlist, char *inhost) return NOTOK; } sasl_outbuflen = 0; - - sasl_inbuffer = malloc(SASL_MAXRECVBUF); - - if (sasl_inbuffer == NULL) { - sm_ierror("Unable to allocate %d bytes for SASL input " - "buffer", SASL_MAXRECVBUF); - free(sasl_outbuffer); - return NOTOK; - } sasl_inbuflen = 0; sasl_inptr = sasl_inbuffer; } else { sasl_outbuffer = NULL; - sasl_inbuffer = NULL; + /* Don't NULL out sasl_inbuffer because it could be used in + sm_fgetc (). */ } sasl_complete = 1; -- 1.7.10.4