summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-30 08:38:52 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-30 08:38:52 +0000
commitbc369e79758f08661d031514657a1036ffd052a9 (patch)
tree0e48942950140623eeed71e4efd47b8349638efa /MdeModulePkg
parentc8e073513b8f6726b6f4c02fa4208a13d71fed30 (diff)
downloadedk2-platforms-bc369e79758f08661d031514657a1036ffd052a9.tar.xz
Add NULL pointer checking against Data.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10724 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c3
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c3
-rw-r--r--MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
index a34fa48e45..cbc848170e 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
@@ -129,7 +129,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
- } else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
+ } else if (Data != NULL &&
+ CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
index 8024f2f5df..6267725751 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
@@ -125,7 +125,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
- } else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
+ } else if (Data != NULL &&
+ CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA
diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
index 408511ef97..27a243be06 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
@@ -125,7 +125,8 @@ SerialStatusCodeReportWorker (
Value,
Instance
);
- } else if (CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
+ } else if (Data != NULL &&
+ CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&
((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {
//
// EFI_STATUS_CODE_STRING_DATA