]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
IntelFrameworkModulePkg BdsDxe: Use safe string functions
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / FrontPage.c
index a0c638100a6f8726ae30949260c28e22165bf7d0..5646457664b2c8d747430c9a61f18cad6007bf9c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   FrontPage routines to handle the callbacks and browser calls\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
@@ -628,9 +628,9 @@ ConvertProcessorToString (
   StringBuffer = AllocateZeroPool (0x20);\r
   ASSERT (StringBuffer != NULL);\r
   Index = UnicodeValueToString (StringBuffer, LEFT_JUSTIFY, FreqMhz / 1000, 3);\r
-  StrCat (StringBuffer, L".");\r
+  StrCatS (StringBuffer, 0x20 / sizeof (CHAR16), L".");\r
   UnicodeValueToString (StringBuffer + Index + 1, PREFIX_ZERO, (FreqMhz % 1000) / 10, 2);\r
-  StrCat (StringBuffer, L" GHz");\r
+  StrCatS (StringBuffer, 0x20 / sizeof (CHAR16), L" GHz");\r
   *String = (CHAR16 *) StringBuffer;\r
   return ;\r
 }\r
@@ -654,7 +654,7 @@ ConvertMemorySizeToString (
   StringBuffer = AllocateZeroPool (0x20);\r
   ASSERT (StringBuffer != NULL);\r
   UnicodeValueToString (StringBuffer, LEFT_JUSTIFY, MemorySize, 6);\r
-  StrCat (StringBuffer, L" MB RAM");\r
+  StrCatS (StringBuffer, 0x20 / sizeof (CHAR16), L" MB RAM");\r
 \r
   *String = (CHAR16 *) StringBuffer;\r
 \r