summaryrefslogtreecommitdiff
path: root/source4/auth/gensec/gensec_krb5.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/auth/gensec/gensec_krb5.c')
-rw-r--r--source4/auth/gensec/gensec_krb5.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 7f512caab25..94506c87f67 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -422,7 +422,9 @@ static DATA_BLOB gensec_gssapi_gen_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLO
if (!asn1_pop_tag(data)) goto err;
- ret = data_blob_talloc(mem_ctx, data->data, data->length);
+ if (!asn1_extract_blob(data, mem_ctx, &ret)) {
+ goto err;
+ }
asn1_free(data);
return ret;