[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trousers-tech
Subject:    Re: [TrouSerS-tech] [PATCH 14/17] Prevents dereference of null when calling TCTP_SetCapability_Inter
From:       "Fuchs, Andreas" <andreas.fuchs () sit ! fraunhofer ! de>
Date:       2014-04-11 9:52:31
Message-ID: 1397209951.15139.40.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 10291
> 
> The aforementioned function dereferenced the auth parameter without
> checking for NULL first.
> 
> Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com>
> ---
> src/tcs/tcsi_caps_tpm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/tcs/tcsi_caps_tpm.c b/src/tcs/tcsi_caps_tpm.c
> index 9f05c4e..b600fe0 100644
> --- a/src/tcs/tcsi_caps_tpm.c
> +++ b/src/tcs/tcsi_caps_tpm.c
> @@ -113,7 +113,8 @@ TCSP_SetCapability_Internal(TCS_CONTEXT_HANDLE hContext,	/* in \
> */  if ((result = ctx_verify_context(hContext)))
> 		goto done;
> 
> -	if ((result = auth_mgr_check(hContext, &pOwnerAuth->AuthHandle)))
> +	if ((pOwnerAuth != NULL) &&
> +		(result = auth_mgr_check(hContext, &pOwnerAuth->AuthHandle)))
> 		goto done;
> 
> 	if ((result = tpm_rqu_build(TPM_ORD_SetCapability, &offset, txBlob, capArea, \
> subCapSize,

------------------------------------------------------------------------------
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