Allocate the memory we later use.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18811 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-10-22 07:32:40 +00:00
parent b04201d5d4
commit d2388f8176

View File

@@ -611,6 +611,11 @@ AES_string_to_key(krb5_context context,
return KRB5_PROG_KEYTYPE_NOSUPP;
kd.schedule = NULL;
ALLOC(kd.key, 1);
if(kd.key == NULL) {
krb5_set_error_string (context, "malloc: out of memory");
return ENOMEM;
}
kd.key->keytype = enctype;
ret = krb5_data_alloc(&kd.key->keyvalue, et->keytype->size);
if (ret) {