From: Richard Maciel <[email protected]>

Related to coverity CID 10288.

switch case TPM_ORD_ActivateIdentity included an if structure to check
for auth1 and auth2 values. However, auth2 was checked in a previous
if. That made the if (auth2) check the default case in the structure
and the else would never be reached.

Signed-off-by: Richard Maciel <[email protected]>
---
 src/tcs/tcs_pbg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/tcs/tcs_pbg.c b/src/tcs/tcs_pbg.c
index 507cc27..3970f22 100644
--- a/src/tcs/tcs_pbg.c
+++ b/src/tcs/tcs_pbg.c
@@ -499,8 +499,7 @@ tpm_rsp_parse(TPM_COMMAND_CODE ordinal, BYTE *b, UINT32 
len, ...)
                } else if (auth2) {
                        offset1 = offset2 = len - TSS_TPM_RSP_BLOB_AUTH_LEN;
                        UnloadBlob_Auth(&offset1, b, auth2);
-               } else
-                       offset2 = len;
+               }
 
                offset1 = TSS_TPM_TXBLOB_HDR_LEN;
                offset2 -= TSS_TPM_TXBLOB_HDR_LEN;
-- 
1.8.5.3


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
TrouSerS-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-tech

Reply via email to