]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
IntelFrameworkModulePkg GenericBdsLib: Use safe string functions
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / GenericBdsLib / BdsMisc.c
index dbb132226f1374108b9c7e92f986758309727c10..b5be63140f4f8023dab011a47cab8488c0bc8429 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Misc BDS library function\r
 \r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1127,12 +1127,16 @@ SetupResetReminder (
   if (IsResetReminderFeatureEnable ()) {\r
     if (IsResetRequired ()) {\r
 \r
-      StringBuffer1 = AllocateZeroPool (MAX_STRING_LEN * sizeof (CHAR16));\r
+      StringBuffer1 = AllocateCopyPool (\r
+                        MAX_STRING_LEN * sizeof (CHAR16),\r
+                        L"Configuration changed. Reset to apply it Now."\r
+                        );\r
       ASSERT (StringBuffer1 != NULL);\r
-      StringBuffer2 = AllocateZeroPool (MAX_STRING_LEN * sizeof (CHAR16));\r
+      StringBuffer2 = AllocateCopyPool (\r
+                        MAX_STRING_LEN * sizeof (CHAR16),\r
+                        L"Press ENTER to reset"\r
+                        );\r
       ASSERT (StringBuffer2 != NULL);\r
-      StrCpy (StringBuffer1, L"Configuration changed. Reset to apply it Now.");\r
-      StrCpy (StringBuffer2, L"Press ENTER to reset");\r
       //\r
       // Popup a menu to notice user\r
       //\r