* [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference
@ 2017-02-27 1:38 Hao Wu
2017-02-27 1:38 ` [PATCH 1/2] PerformancePkg/Dp_App: " Hao Wu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hao Wu @ 2017-02-27 1:38 UTC (permalink / raw)
To: edk2-devel; +Cc: Hao Wu, Star Zeng
Cc: Star Zeng <star.zeng@intel.com>
Hao Wu (2):
PerformancePkg/Dp_App: Add check to avoid NULL pointer dereference
ShellPkg/UefiDpLib: Add check to avoid NULL pointer dereference
PerformancePkg/Dp_App/Dp.c | 2 +-
ShellPkg/Library/UefiDpLib/Dp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.9.5.msysgit.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] PerformancePkg/Dp_App: Add check to avoid NULL pointer dereference
2017-02-27 1:38 [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference Hao Wu
@ 2017-02-27 1:38 ` Hao Wu
2017-02-27 1:38 ` [PATCH 2/2] ShellPkg/UefiDpLib: " Hao Wu
2017-02-27 1:39 ` [PATCH 0/2] Dp: " Zeng, Star
2 siblings, 0 replies; 4+ messages in thread
From: Hao Wu @ 2017-02-27 1:38 UTC (permalink / raw)
To: edk2-devel; +Cc: Hao Wu, Star Zeng
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
PerformancePkg/Dp_App/Dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PerformancePkg/Dp_App/Dp.c b/PerformancePkg/Dp_App/Dp.c
index e2cb862..4cdc39e 100644
--- a/PerformancePkg/Dp_App/Dp.c
+++ b/PerformancePkg/Dp_App/Dp.c
@@ -400,7 +400,7 @@ InitializeDp (
// EndCount = Value counter counts to before it needs to be reset
//
Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (PerformanceProperty == NULL)) {
PrintToken (STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND));
goto Done;
}
--
1.9.5.msysgit.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ShellPkg/UefiDpLib: Add check to avoid NULL pointer dereference
2017-02-27 1:38 [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference Hao Wu
2017-02-27 1:38 ` [PATCH 1/2] PerformancePkg/Dp_App: " Hao Wu
@ 2017-02-27 1:38 ` Hao Wu
2017-02-27 1:39 ` [PATCH 0/2] Dp: " Zeng, Star
2 siblings, 0 replies; 4+ messages in thread
From: Hao Wu @ 2017-02-27 1:38 UTC (permalink / raw)
To: edk2-devel; +Cc: Hao Wu, Star Zeng
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
ShellPkg/Library/UefiDpLib/Dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/Dp.c
index 33f69a0..35ead75 100644
--- a/ShellPkg/Library/UefiDpLib/Dp.c
+++ b/ShellPkg/Library/UefiDpLib/Dp.c
@@ -272,7 +272,7 @@ ShellCommandRunDp (
// EndCount = Value counter counts to before it needs to be reset
//
Status = EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (VOID **) &PerformanceProperty);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (PerformanceProperty == NULL)) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND), gDpHiiHandle);
goto Done;
}
--
1.9.5.msysgit.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference
2017-02-27 1:38 [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference Hao Wu
2017-02-27 1:38 ` [PATCH 1/2] PerformancePkg/Dp_App: " Hao Wu
2017-02-27 1:38 ` [PATCH 2/2] ShellPkg/UefiDpLib: " Hao Wu
@ 2017-02-27 1:39 ` Zeng, Star
2 siblings, 0 replies; 4+ messages in thread
From: Zeng, Star @ 2017-02-27 1:39 UTC (permalink / raw)
To: Wu, Hao A, edk2-devel@lists.01.org; +Cc: Zeng, Star
Reviewed-by: Star Zeng <star.zeng@intel.com>
-----Original Message-----
From: Wu, Hao A
Sent: Monday, February 27, 2017 9:39 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A <hao.a.wu@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference
Cc: Star Zeng <star.zeng@intel.com>
Hao Wu (2):
PerformancePkg/Dp_App: Add check to avoid NULL pointer dereference
ShellPkg/UefiDpLib: Add check to avoid NULL pointer dereference
PerformancePkg/Dp_App/Dp.c | 2 +-
ShellPkg/Library/UefiDpLib/Dp.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
1.9.5.msysgit.0
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-27 1:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-27 1:38 [PATCH 0/2] Dp: Add check to avoid NULL pointer dereference Hao Wu
2017-02-27 1:38 ` [PATCH 1/2] PerformancePkg/Dp_App: " Hao Wu
2017-02-27 1:38 ` [PATCH 2/2] ShellPkg/UefiDpLib: " Hao Wu
2017-02-27 1:39 ` [PATCH 0/2] Dp: " Zeng, Star
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox