summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2015-08-13 00:15:06 +0000
committerdandanbi <dandanbi@Edk2>2015-08-13 00:15:06 +0000
commitd91cb87049db11a193bacec72506a24df19e46e9 (patch)
treed9cfb294e8788cb0e2a8763a73bb82a08e3af7a4 /MdeModulePkg/Application/UiApp/BootMaint/Variable.c
parent0cd1ecea673160417e30e46009a54d361a131235 (diff)
downloadedk2-platforms-d91cb87049db11a193bacec72506a24df19e46e9.tar.xz
MdeModulePkg:Use safe string functions in UiApp.
Replace the unsafe string functions with the safe one in UiApp. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18214 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Application/UiApp/BootMaint/Variable.c')
-rw-r--r--MdeModulePkg/Application/UiApp/BootMaint/Variable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
index 5e5592fb93..4fe8c534eb 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/Variable.c
@@ -559,7 +559,7 @@ Var_UpdateDriverOption (
);
if (*DescriptionData == 0x0000) {
- StrCpy (DescriptionData, DriverString);
+ StrCpyS (DescriptionData, MAX_MENU_NUMBER, DriverString);
}
BufferSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (DescriptionData);
@@ -727,7 +727,7 @@ Var_UpdateBootOption (
UnicodeSPrint (BootString, sizeof (BootString), L"Boot%04x", Index);
if (NvRamMap->DescriptionData[0] == 0x0000) {
- StrCpy (NvRamMap->DescriptionData, BootString);
+ StrCpyS (NvRamMap->DescriptionData, sizeof (NvRamMap->DescriptionData) / sizeof (NvRamMap->DescriptionData[0]), BootString);
}
BufferSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (NvRamMap->DescriptionData);