diff options
author | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-19 06:55:18 +0000 |
---|---|---|
committer | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-19 06:55:18 +0000 |
commit | c59634eab662fe4cc79a27827f9fc90f40f78523 (patch) | |
tree | 9afe088efba10ee9c1f6ee88845ad28b4eded01c | |
parent | 8c80d3942e41325fe0f4dc2f5deea2bd9fda8e53 (diff) | |
download | edk2-c59634eab662fe4cc79a27827f9fc90f40f78523.zip edk2-c59634eab662fe4cc79a27827f9fc90f40f78523.tar.gz edk2-c59634eab662fe4cc79a27827f9fc90f40f78523.tar.bz2 |
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.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 31 |
2 files changed, 17 insertions, 16 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 8bcd498..36cf919 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 fab1267..3d70207 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);
}
|