check return copy_Realm, copy_PrincipalName, copy_EncryptionKey
The ASN.1 functions copy_Realm(), copy_PrincipalName() and copy_EncryptionKey() can fail. Check the return and perform error handling as appropriate. Change-Id: I2b3629d19db96eb41d1cd554cef1dca99745e753
This commit is contained in:
@@ -271,7 +271,11 @@ krb5_rd_cred(krb5_context context,
|
||||
}
|
||||
if(creds->ticket.length != len)
|
||||
krb5_abortx(context, "internal error in ASN.1 encoder");
|
||||
copy_EncryptionKey (&kci->key, &creds->session);
|
||||
ret = copy_EncryptionKey (&kci->key, &creds->session);
|
||||
if (ret) {
|
||||
krb5_free_creds(context, creds);
|
||||
goto out;
|
||||
}
|
||||
if (kci->prealm && kci->pname)
|
||||
_krb5_principalname2krb5_principal (context,
|
||||
&creds->client,
|
||||
|
Reference in New Issue
Block a user