summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-19 06:55:18 +0000
committerjji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-19 06:55:18 +0000
commitc59634eab662fe4cc79a27827f9fc90f40f78523 (patch)
tree9afe088efba10ee9c1f6ee88845ad28b4eded01c
parent8c80d3942e41325fe0f4dc2f5deea2bd9fda8e53 (diff)
downloadedk2-platforms-c59634eab662fe4cc79a27827f9fc90f40f78523.tar.xz
Source level security checked
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7303 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c2
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Database.c31
2 files changed, 17 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 8bcd498e77..36cf919b42 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -302,8 +302,8 @@ AppendToMultiString (
MultiStringSize + AppendStringSize,
(VOID *) (*MultiString)
);
+ ASSERT (*MultiString != NULL);
}
-
//
// Append the incoming string
//
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
index fab12670d9..3d70207952 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c
@@ -877,13 +877,13 @@ InsertStringPackage (
Error:
- if (StringPackage->StringBlock != NULL) {
- FreePool (StringPackage->StringBlock);
- }
- if (StringPackage->StringPkgHdr != NULL) {
- FreePool (StringPackage->StringPkgHdr);
- }
if (StringPackage != NULL) {
+ if (StringPackage->StringBlock != NULL) {
+ FreePool (StringPackage->StringBlock);
+ }
+ if (StringPackage->StringPkgHdr != NULL) {
+ FreePool (StringPackage->StringPkgHdr);
+ }
FreePool (StringPackage);
}
return Status;
@@ -1182,10 +1182,10 @@ Error:
if (FontInfo != NULL) {
FreePool (FontInfo);
}
- if (FontPackage->GlyphBlock != NULL) {
- FreePool (FontPackage->GlyphBlock);
- }
if (FontPackage != NULL) {
+ if (FontPackage->GlyphBlock != NULL) {
+ FreePool (FontPackage->GlyphBlock);
+ }
FreePool (FontPackage);
}
if (GlobalFont != NULL) {
@@ -1713,10 +1713,10 @@ InsertSimpleFontPackage (
Error:
- if (SimpleFontPackage->SimpleFontPkgHdr != NULL) {
- FreePool (SimpleFontPackage->SimpleFontPkgHdr);
- }
if (SimpleFontPackage != NULL) {
+ if (SimpleFontPackage->SimpleFontPkgHdr != NULL) {
+ FreePool (SimpleFontPackage->SimpleFontPkgHdr);
+ }
FreePool (SimpleFontPackage);
}
return Status;
@@ -2158,10 +2158,11 @@ InsertKeyboardLayoutPackage (
Error:
- if (KeyboardLayoutPackage->KeyboardPkg != NULL) {
- FreePool (KeyboardLayoutPackage->KeyboardPkg);
- }
+
if (KeyboardLayoutPackage != NULL) {
+ if (KeyboardLayoutPackage->KeyboardPkg != NULL) {
+ FreePool (KeyboardLayoutPackage->KeyboardPkg);
+ }
FreePool (KeyboardLayoutPackage);
}