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:
@@ -117,8 +117,12 @@ _krb5_build_authenticator (krb5_context context,
|
||||
memset(&auth, 0, sizeof(auth));
|
||||
|
||||
auth.authenticator_vno = 5;
|
||||
copy_Realm(&cred->client->realm, &auth.crealm);
|
||||
copy_PrincipalName(&cred->client->name, &auth.cname);
|
||||
ret = copy_Realm(&cred->client->realm, &auth.crealm);
|
||||
if (ret)
|
||||
goto fail;
|
||||
ret = copy_PrincipalName(&cred->client->name, &auth.cname);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
krb5_us_timeofday (context, &auth.ctime, &auth.cusec);
|
||||
|
||||
|
Reference in New Issue
Block a user