Add parameter check in SmmBase.Communicate().
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Mar 2010 08:39:40 +0000 (08:39 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Mar 2010 08:39:40 +0000 (08:39 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@10289 6f19259b-4bc3-4df7-8a09-765794883524

edk2/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c

index 51240bb..e470da0 100644 (file)
@@ -202,6 +202,10 @@ SmmBaseCommunicate (
   /// Note this is a runtime interface\r
   ///\r
 \r
+  if (CommunicationBuffer == NULL || BufferSize == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   mCommunicationData.FunctionData.Function = SmmBaseFunctionCommunicate;\r
   mCommunicationData.FunctionData.Args.Communicate.ImageHandle = ImageHandle;\r
   mCommunicationData.FunctionData.Args.Communicate.CommunicationBuffer = CommunicationBuffer;\r