Reviewed-by: [email protected]

> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of
> Hao Wu
> Sent: Monday, November 21, 2016 3:52 PM
> To: [email protected]
> Cc: Wu, Hao A <[email protected]>; Tian, Feng <[email protected]>;
> Dong, Eric <[email protected]>
> Subject: [edk2] [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure
> 'ByteSeq' is not NULL
> 
> Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by
> CopyMem().
> 
> Cc: Eric Dong <[email protected]>
> Cc: Feng Tian <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hao Wu <[email protected]>
> ---
>  SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
> b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
> index e333b55..76b25a3 100644
> --- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
> +++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c
> @@ -1435,6 +1435,8 @@ TcgGetNextTcgUid(
>      return TcgResultFailure;
>    }
> 
> +  ASSERT (ByteSeq != NULL);
> +
>    CopyMem(Uid, ByteSeq, sizeof(TCG_UID));
> 
>    return TcgResultSuccess;
> --
> 1.9.5.msysgit.0
> 
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to