summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-06-30 06:28:33 +0000
committerhwu1225 <hwu1225@Edk2>2015-06-30 06:28:33 +0000
commitc5ad1f8621e6aedf06f5212d56ebd33dec79b899 (patch)
treed12b322319ac7f20579b9c0f3f0473c5b6f9bd37 /IntelFrameworkModulePkg
parentbded41b26836cd01b6520acbe487631a71a90cdc (diff)
downloadedk2-platforms-c5ad1f8621e6aedf06f5212d56ebd33dec79b899.tar.xz
IntelFrameworkModulePkg UpdateDriverDxe: Use safe string functions
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17739 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c b/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c
index 17e728db30..023506e6ee 100644
--- a/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c
+++ b/IntelFrameworkModulePkg/Universal/FirmwareVolume/UpdateDriverDxe/ParseUpdateProfile.c
@@ -3,7 +3,7 @@
configuration file and pass the information to the update driver
so that the driver can perform updates accordingly.
- Copyright (c) 2002 - 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2002 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -674,11 +674,10 @@ UpdateStringToGuid (
UINT8 Digits[3];
StrLen = AsciiStrLen ((CONST CHAR8 *) Str);
- Buffer = AllocatePool (StrLen + 1);
+ Buffer = AllocateCopyPool (StrLen + 1, Str);
if (Buffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
- AsciiStrCpy ((CHAR8 *)Buffer, (CHAR8 *)Str);
//
// Data1
@@ -997,7 +996,7 @@ ParseUpdateDataFile (
//
// Get the section name of each update
//
- AsciiStrCpy (Entry, "Update");
+ AsciiStrCpyS (Entry, MAX_LINE_LENGTH, "Update");
UpdateStrCatNumber ((UINT8 *) Entry, Index);
Value = NULL;
Status = UpdateGetProfileString (