MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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/Core/PiSmmCore/PiSmmCore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
index 1ccb9c7787ad..f136b5d5693b 100644
--- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
+++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
@@ -321,7 +321,7 @@ SmmReadyToBootHandler (
NULL,
(VOID **)&SxDispatch
);
- if (!EFI_ERROR (Status)) {
+ if (!EFI_ERROR (Status) && (SxDispatch != NULL)) {
//
// Register a S3 entry callback function to
// determine if it will be during S3 resume.
--
2.7.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> -----Original Message-----
> From: Zeng, Star
> Sent: Wednesday, December 13, 2017 11:28 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star; Wu, Hao A; Yao, Jiewen
> Subject: [PATCH] MdeModulePkg PiSmmCore: Ensure SxDispatch not NULL
> before dereferenced
>
> 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/Core/PiSmmCore/PiSmmCore.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> index 1ccb9c7787ad..f136b5d5693b 100644
> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c
> @@ -321,7 +321,7 @@ SmmReadyToBootHandler (
> NULL,
> (VOID **)&SxDispatch
> );
> - if (!EFI_ERROR (Status)) {
> + if (!EFI_ERROR (Status) && (SxDispatch != NULL)) {
> //
> // Register a S3 entry callback function to
> // determine if it will be during S3 resume.
> --
> 2.7.0.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2026 Red Hat, Inc.