]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg S3Resume2Pei: Use safe string functions
authorHao Wu <hao.a.wu@intel.com>
Tue, 30 Jun 2015 06:30:44 +0000 (06:30 +0000)
committerhwu1225 <hwu1225@Edk2>
Tue, 30 Jun 2015 06:30:44 +0000 (06:30 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17744 6f19259b-4bc3-4df7-8a09-765794883524

UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c

index aa1c8032915879eae905b4bfc0dbecb1b938f6d8..d9d4ecbdcb93b3c0796912a3fb6aca0886c7b206 100644 (file)
@@ -4,7 +4,7 @@
   This module will excute the boot script saved during last boot and after that,\r
   control is passed to OS waking up handler.\r
 \r
   This module will excute the boot script saved during last boot and after that,\r
   control is passed to OS waking up handler.\r
 \r
-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions\r
@@ -366,8 +366,7 @@ WriteToOsS3PerformanceData (
       if ((AsciiStrnCmp (Token, "PEIM", PEI_PERFORMANCE_STRING_SIZE) == 0) && (Handle != NULL)) {\r
         AsciiSPrint (PerfData->Token, PERF_TOKEN_LENGTH, "0x%11p", Handle);\r
       } else {\r
       if ((AsciiStrnCmp (Token, "PEIM", PEI_PERFORMANCE_STRING_SIZE) == 0) && (Handle != NULL)) {\r
         AsciiSPrint (PerfData->Token, PERF_TOKEN_LENGTH, "0x%11p", Handle);\r
       } else {\r
-        AsciiStrnCpy (PerfData->Token, Token, PERF_TOKEN_LENGTH);\r
-        PerfData->Token[PERF_TOKEN_LENGTH] = '\0';\r
+        AsciiStrCpyS (PerfData->Token, PERF_TOKEN_SIZE, Token);\r
       }\r
       if (StartTicker == 1) {\r
         StartTicker = StartValue;\r
       }\r
       if (StartTicker == 1) {\r
         StartTicker = StartValue;\r