[edk2] [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error

Star Zeng posted 1 patch 7 years, 1 month ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2] [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error
Posted by Star Zeng 7 years, 1 month ago
Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
index 606a53db1da1..6b19362699b1 100644
--- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
+++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
@@ -134,7 +134,7 @@ EhcInitSched (
              &Map
              );
 
-  if (EFI_ERROR (Status)) {
+  if (EFI_ERROR (Status) || (Buf == NULL)) {
     return EFI_OUT_OF_RESOURCES;
   }
 
-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to return error
Posted by Wu, Hao A 7 years, 1 month ago
Reviewed-by: Hao Wu <hao.a.wu@intel.com>


Best Regards,
Hao Wu


> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, November 20, 2017 3:33 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star; Wu, Hao A; Yao, Jiewen
> Subject: [PATCH] MdeModulePkg EhciPei: Also check Buf against NULL to
> return error
> 
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
>  MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
> b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
> index 606a53db1da1..6b19362699b1 100644
> --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
> +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c
> @@ -134,7 +134,7 @@ EhcInitSched (
>               &Map
>               );
> 
> -  if (EFI_ERROR (Status)) {
> +  if (EFI_ERROR (Status) || (Buf == NULL)) {
>      return EFI_OUT_OF_RESOURCES;
>    }
> 
> --
> 2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel