From e5f45262ef76c37dc0403c3d556ac40fbcba1fd0 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 27 Mar 2011 12:52:43 +1100 Subject: [PATCH] check provider enabled before non-marshalled initializing --- util_attr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util_attr.cpp b/util_attr.cpp index 2b4d7c4..ed45cd3 100644 --- a/util_attr.cpp +++ b/util_attr.cpp @@ -344,7 +344,7 @@ gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer) for (type = ATTR_TYPE_MIN; type <= ATTR_TYPE_MAX; type++) { gss_eap_attr_provider *provider; - if (didInit[type]) + if (didInit[type] || !providerEnabled(type)) continue; provider = m_providers[type]; @@ -354,11 +354,11 @@ gss_eap_attr_ctx::initFromBuffer(const gss_buffer_t buffer) GSS_C_NO_CONTEXT); if (ret == false) { releaseProvider(type); - break; + return false; } } - return ret; + return true; } gss_eap_attr_ctx::~gss_eap_attr_ctx(void) -- 2.1.4