From 901e3b7246de9bdc07e2b3d88f55917bf2a37377 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 10 Feb 2012 08:07:21 +1100 Subject: Revert "gensec: Fix a memory corruption in gensec_use_kerberos_mechs" This reverts commit 744ed53a62037a659133ccd4de2065491208ae7d. The real bug here is that the second half of the outer loop should not have been run once we found spnego. Andrew Bartlett --- auth/gensec/gensec_start.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'auth/gensec') diff --git a/auth/gensec/gensec_start.c b/auth/gensec/gensec_start.c index ab092a7bb1..08b2fb68cb 100644 --- a/auth/gensec/gensec_start.c +++ b/auth/gensec/gensec_start.c @@ -75,8 +75,7 @@ _PUBLIC_ struct gensec_security_ops **gensec_use_kerberos_mechs(TALLOC_CTX *mem_ /* noop */ } - new_gensec_list = talloc_array(mem_ctx, struct gensec_security_ops *, - num_mechs_in*2 + 1); + new_gensec_list = talloc_array(mem_ctx, struct gensec_security_ops *, num_mechs_in + 1); if (!new_gensec_list) { return NULL; } -- cgit