diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2015-07-01 08:23:30 +0000 |
---|---|---|
committer | shenshushi <shenshushi@Edk2> | 2015-07-01 08:23:30 +0000 |
commit | 931d4d8269947146547d9f0d4777dd6d2d538548 (patch) | |
tree | 3fb11786986d20dfef7f39355cc90d9a7fa39ef8 /MdeModulePkg/Universal/CapsuleRuntimeDxe | |
parent | 59d1f4f0ab6a23724524ff9374cae368dc20af9a (diff) | |
download | edk2-platforms-931d4d8269947146547d9f0d4777dd6d2d538548.tar.xz |
MdeModulePkg/Universal/CapsuleRuntimeDxe: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17784 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/CapsuleRuntimeDxe')
-rw-r--r-- | MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c index 61ee91951b..ed8820a8f7 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c @@ -4,7 +4,7 @@ It installs the Capsule Architectural Protocol defined in PI1.0a to signify
the capsule runtime services are ready.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -202,7 +202,7 @@ UpdateCapsule ( // Construct variable name CapsuleUpdateData, CapsuleUpdateData1, CapsuleUpdateData2...
// if user calls UpdateCapsule multiple times.
//
- StrCpy (CapsuleVarName, EFI_CAPSULE_VARIABLE_NAME);
+ StrCpyS (CapsuleVarName, sizeof(CapsuleVarName)/sizeof(CHAR16), EFI_CAPSULE_VARIABLE_NAME);
TempVarName = CapsuleVarName + StrLen (CapsuleVarName);
if (mTimes > 0) {
UnicodeValueToString (TempVarName, 0, mTimes, 0);
|