[prev in list] [next in list] [prev in thread] [next in thread]
List: trousers-tech
Subject: Re: [TrouSerS-tech] [PATCH 17/17] Removed dead code from tpm_rsp_parse function
From: "Fuchs, Andreas" <andreas.fuchs () sit ! fraunhofer ! de>
Date: 2014-04-11 9:52:59
Message-ID: 1397209979.15139.43.camel () pc-fuchslap2 ! sit ! fraunhofer ! de
[Download RAW message or body]
Disclaimer:
I could not complie-test or runtime-test these patches right now. This is a pure \
code-only review of the patches.
Looks good.
Am Mittwoch, den 09.04.2014, 15:41 -0300 schrieb rmaciel@linux.vnet.ibm.com:
> From: Richard Maciel <rmaciel@linux.vnet.ibm.com>
>
> 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 <rmaciel@linux.vnet.ibm.com>
> ---
> 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;
------------------------------------------------------------------------------
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
TrouSerS-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/trousers-tech
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic