summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/gssapi/get_mic.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-04-24 09:36:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:15 -0500
commitc33f6b2c370379dfd010600adc59e7439f1318f7 (patch)
tree2ac36b3751796f05ecb45a2ecd03bd166ed7182f /source4/heimdal/lib/gssapi/get_mic.c
parent0eddf14b307e905663b95296aa695a10d3fb90f7 (diff)
downloadsamba-c33f6b2c370379dfd010600adc59e7439f1318f7.tar.gz
samba-c33f6b2c370379dfd010600adc59e7439f1318f7.tar.bz2
samba-c33f6b2c370379dfd010600adc59e7439f1318f7.zip
r15192: Update Samba4 to use current lorikeet-heimdal.
Andrew Bartlett (This used to be commit f0e538126c5cb29ca14ad0d8281eaa0a715ed94f)
Diffstat (limited to 'source4/heimdal/lib/gssapi/get_mic.c')
-rw-r--r--source4/heimdal/lib/gssapi/get_mic.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/heimdal/lib/gssapi/get_mic.c b/source4/heimdal/lib/gssapi/get_mic.c
index 1c950e95d9..fc9e9aa1a9 100644
--- a/source4/heimdal/lib/gssapi/get_mic.c
+++ b/source4/heimdal/lib/gssapi/get_mic.c
@@ -33,7 +33,7 @@
#include "gssapi_locl.h"
-RCSID("$Id: get_mic.c,v 1.29 2005/01/05 02:52:12 lukeh Exp $");
+RCSID("$Id: get_mic.c,v 1.30 2006/04/02 02:12:52 lha Exp $");
static OM_uint32
mic_des
@@ -59,6 +59,7 @@ mic_des
message_token->length = total_len;
message_token->value = malloc (total_len);
if (message_token->value == NULL) {
+ message_token->length = 0;
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
@@ -150,6 +151,7 @@ mic_des3
message_token->length = total_len;
message_token->value = malloc (total_len);
if (message_token->value == NULL) {
+ message_token->length = 0;
*minor_status = ENOMEM;
return GSS_S_FAILURE;
}
@@ -179,6 +181,8 @@ mic_des3
kret = krb5_crypto_init(gssapi_krb5_context, key, 0, &crypto);
if (kret) {
free (message_token->value);
+ message_token->value = NULL;
+ message_token->length = 0;
free (tmp);
gssapi_krb5_set_error_string ();
*minor_status = kret;
@@ -196,6 +200,8 @@ mic_des3
krb5_crypto_destroy (gssapi_krb5_context, crypto);
if (kret) {
free (message_token->value);
+ message_token->value = NULL;
+ message_token->length = 0;
gssapi_krb5_set_error_string ();
*minor_status = kret;
return GSS_S_FAILURE;
@@ -221,6 +227,8 @@ mic_des3
ETYPE_DES3_CBC_NONE, &crypto);
if (kret) {
free (message_token->value);
+ message_token->value = NULL;
+ message_token->length = 0;
gssapi_krb5_set_error_string ();
*minor_status = kret;
return GSS_S_FAILURE;
@@ -238,6 +246,8 @@ mic_des3
krb5_crypto_destroy (gssapi_krb5_context, crypto);
if (kret) {
free (message_token->value);
+ message_token->value = NULL;
+ message_token->length = 0;
gssapi_krb5_set_error_string ();
*minor_status = kret;
return GSS_S_FAILURE;