From c5ece2fab8680c1b69b9a1bfae080087ea86d2af Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 18 Sep 2010 18:04:24 +0200 Subject: [PATCH 1/1] insert missing call to gss_eap_attr_ctx constructor --- util_attr.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util_attr.cpp b/util_attr.cpp index 398aa57..681dc5f 100644 --- a/util_attr.cpp +++ b/util_attr.cpp @@ -560,10 +560,12 @@ gssEapExportAttrContext(OM_uint32 *minor, buffer->value = NULL; return GSS_S_COMPLETE; - }; + } try { name->attrCtx->exportToBuffer(buffer); + if (buffer->length == 0) + return GSS_S_FAILURE; } catch (std::exception &e) { return mapException(minor, e); } @@ -582,7 +584,7 @@ gssEapImportAttrContext(OM_uint32 *minor, if (buffer->length != 0) { try { - ctx = new gss_eap_attr_ctx; + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromBuffer(NULL, buffer)) { delete ctx; @@ -609,6 +611,7 @@ gssEapDuplicateAttrContext(OM_uint32 *minor, try { if (in->attrCtx != NULL) { + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromExistingContext(NULL, in->attrCtx)) { delete ctx; return GSS_S_FAILURE; @@ -706,7 +709,7 @@ gssEapCreateAttrContext(gss_cred_id_t gssCred, { gss_eap_attr_ctx *ctx; - ctx = new gss_eap_attr_ctx; + ctx = new gss_eap_attr_ctx(); if (!ctx->initFromGssContext(NULL, gssCred, gssCtx)) { delete ctx; return NULL; -- 2.1.4