Reviewed-by: Hao Wu <[email protected]>

Best Regards,
Hao Wu


> -----Original Message-----
> From: Zeng, Star
> Sent: Thursday, August 02, 2018 9:16 AM
> To: [email protected]
> Cc: Zeng, Star; Yao, Jiewen; Wu, Hao A
> Subject: [PATCH] MdeModulePkg DxeCapsuleLibFmp: Add NULL check to the
> return buffers
> 
> Add NULL check to the return buffers from GetFmpHandleBufferByType().
> 
> Cc: Jiewen Yao <[email protected]>
> Cc: Hao A Wu <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <[email protected]>
> ---
>  MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> index 85848279d44c..91c6849a4658 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c
> @@ -1225,7 +1225,9 @@ ProcessFmpCapsuleImage (
>                 &HandleBuffer,
>                 &ResetRequiredBuffer
>                 );
> -    if (EFI_ERROR(Status)) {
> +    if (EFI_ERROR(Status) ||
> +        (HandleBuffer == NULL) ||
> +        (ResetRequiredBuffer == NULL)) {
>        NotReady = TRUE;
>        RecordFmpCapsuleStatus (
>          NULL,
> --
> 2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to