From 1329da4417afbbc54da4a6409f1a230cc2c93154 Mon Sep 17 00:00:00 2001 From: rsun3 Date: Fri, 19 Mar 2010 08:39:40 +0000 Subject: [PATCH] Add parameter check in SmmBase.Communicate(). git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10289 6f19259b-4bc3-4df7-8a09-765794883524 --- .../SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c index 51240bbdc7..e470da0af0 100644 --- a/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c +++ b/EdkCompatibilityPkg/Compatibility/SmmBaseOnSmmBase2Thunk/SmmBaseOnSmmBase2Thunk.c @@ -202,6 +202,10 @@ SmmBaseCommunicate ( /// Note this is a runtime interface /// + if (CommunicationBuffer == NULL || BufferSize == NULL) { + return EFI_INVALID_PARAMETER; + } + mCommunicationData.FunctionData.Function = SmmBaseFunctionCommunicate; mCommunicationData.FunctionData.Args.Communicate.ImageHandle = ImageHandle; mCommunicationData.FunctionData.Args.Communicate.CommunicationBuffer = CommunicationBuffer;