Skip to contentSkip to conversation

sasl_choose_mech could return an uninitialized conn pointer

PATCH New Jeff Moyer 1 participant 1 message Sep 4, 2009 Kernel automounter

lore
Share & tools
lore

Jeff Moyer

author
#0 lore raw

PATCH 1/1 sasl_choose_mech could return an uninitialized conn pointer

Hi, Ian,

If a server returns a set of mechanisms that all require authentication, then the conn pointer is returned to the caller uninitialized. Fix that.

Cheers,
Jeff

modules/cyrus-sasl.c +1 -1
index 4c6a671..806bf9f 100644
@@ -798,7 +798,7 @@ sasl_bind_mech(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt, const c
 sasl_conn_t *
 sasl_choose_mech(unsigned logopt, LDAP *ldap, struct lookup_context *ctxt)
 {
-	sasl_conn_t *conn;
+	sasl_conn_t *conn = NULL;
 	int authenticated;
 	int i;
 	char **mechanisms;