Skip to content

Commit ef72f93

Browse files
committed
F-7270 - Return a valid tag from AppendAuth on invalid arguments
1 parent 4792bcc commit ef72f93

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/tpm2_packet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,9 @@ TPM_ST TPM2_Packet_AppendAuth(TPM2_Packet* packet, TPM2_CTX* ctx, CmdInfo_t* inf
459459
{
460460
TPM_ST st = TPM_ST_NO_SESSIONS;
461461

462+
/* the return type is a wire tag, so a negative error cannot be encoded */
462463
if (ctx == NULL || info == NULL)
463-
return BAD_FUNC_ARG;
464+
return st;
464465
if (ctx->session == NULL)
465466
return st;
466467

0 commit comments

Comments
 (0)