From 46cc3885e68cc19981a4756e1a2d40d35f2eb92f Mon Sep 17 00:00:00 2001 From: ydong10 Date: Wed, 25 May 2011 08:15:05 +0000 Subject: Fix ICC build break. Signed-off-by: ydong10 Reviewed-by: git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11701 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MdeModulePkg/Universal') diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index 83e669b9da..9751242fd2 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -444,10 +444,11 @@ CreateAltCfgString ( EFI_STRING TmpStr; UINTN NewLen; + NewLen = StrLen (Result); // // String Len = ConfigResp + AltConfig + AltConfig + 1("\0") // - NewLen = (StrLen (Result) + ((1 + StrLen (ConfigHdr) + 8 + 4) + (8 + 4 + 7 + 4 + 7 + 4)) * 2 + 1) * sizeof (CHAR16); + NewLen = (NewLen + ((1 + StrLen (ConfigHdr) + 8 + 4) + (8 + 4 + 7 + 4 + 7 + 4)) * 2 + 1) * sizeof (CHAR16); StringPtr = AllocateZeroPool (NewLen); if (StringPtr == NULL) { return NULL; -- cgit v1.2.3