]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add return EFI_INVALID_PARAMETER if pointer type parameter for UEFI and Tiano Decompr...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Mar 2007 10:36:04 +0000 (10:36 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Mar 2007 10:36:04 +0000 (10:36 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2501 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Core/Dxe/DxeMain/DxeMain.c

index fce61bd45e778c7a10798f8828d5e95a3d2525d7..427e6b8ca50a005811afc880826d6e80707e1f57 100644 (file)
@@ -848,6 +848,11 @@ DxeMainUefiDecompressGetInfo (
   OUT  UINT32                           *ScratchSize\r
   )\r
 {\r
+  if (Source == NULL \r
+        || DestinationSize == NULL \r
+        || ScratchSize == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
   return UefiDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);\r
 }\r
 \r
@@ -866,7 +871,13 @@ DxeMainUefiDecompress (
   EFI_STATUS  Status;\r
   UINT32      TestDestinationSize;\r
   UINT32      TestScratchSize;\r
-\r
+  \r
+  if (Source == NULL \r
+        || Destination== NULL \r
+        || Scratch == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  \r
   Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -888,6 +899,12 @@ DxeMainTianoDecompressGetInfo (
   OUT  UINT32                           *ScratchSize\r
   )\r
 {\r
+  if (Source == NULL \r
+        || DestinationSize == NULL \r
+        || ScratchSize == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   return TianoDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);\r
 }\r
 \r
@@ -906,7 +923,13 @@ DxeMainTianoDecompress (
   EFI_STATUS  Status;\r
   UINT32      TestDestinationSize;\r
   UINT32      TestScratchSize;\r
-\r
+  \r
+  if (Source == NULL \r
+        || Destination== NULL \r
+        || Scratch == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  \r
   Status = TianoDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -928,6 +951,12 @@ DxeMainCustomDecompressGetInfo (
   OUT  UINT32                            *ScratchSize\r
   )\r
 {\r
+  if (Source == NULL \r
+        || DestinationSize == NULL \r
+        || ScratchSize == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  \r
   return CustomDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);\r
 }\r
 \r
@@ -947,6 +976,12 @@ DxeMainCustomDecompress (
   UINT32      TestDestinationSize;\r
   UINT32      TestScratchSize;\r
 \r
+  if (Source == NULL \r
+        || Destination== NULL \r
+        || Scratch == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   Status = CustomDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r