(hdb_process_master_key): check return value from malloc

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6395 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-07-03 02:30:37 +00:00
parent 85fea37f1e
commit b7f8d1d2a5

View File

@@ -78,7 +78,9 @@ hdb_process_master_key(krb5_context context, EncryptionKey key,
if(key.keytype != ETYPE_DES_CBC_MD5)
return KRB5_PROG_KEYTYPE_NOSUPP;
schedule->length = sizeof(des_key_schedule);
schedule->data = malloc(schedule->length);
schedule->data = malloc(schedule->length);
if (schedule->length != 0 && schedule->data == NULL)
return ENOMEM;
des_set_key((des_cblock*)key.keyvalue.data, schedule->data);
return 0;