]> git.proxmox.com Git - mirror_edk2.git/blobdiff - PerformancePkg/Dp_App/DpTrace.c
PerformancePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr
[mirror_edk2.git] / PerformancePkg / Dp_App / DpTrace.c
index fc21cdc7078a2214d4fc3a3a427becf18e22ba5f..256f7462838c8b7dbae26b13890372089961a3d1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Trace reporting for the Dp utility.\r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
   (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -220,8 +220,8 @@ DumpAllTrace(
       ++Count;    // Count the number of records printed\r
 \r
       // If Handle is non-zero, see if we can determine a name for the driver\r
-      AsciiStrToUnicodeStr (Measurement.Module, mGaugeString); // Use Module by default\r
-      AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);\r
+      AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mGaugeString) / sizeof (mGaugeString[0])); // Use Module by default\r
+      AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));\r
       if (Measurement.Handle != NULL) {\r
         // See if the Handle is in the HandleBuffer\r
         for (TIndex = 0; TIndex < HandleCount; TIndex++) {\r
@@ -594,7 +594,7 @@ ProcessHandles(
         continue;\r
       }\r
       mGaugeString[0] = 0;    // Empty driver name by default\r
-      AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);\r
+      AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));\r
       // See if the Handle is in the HandleBuffer\r
       for (Index = 0; Index < HandleCount; Index++) {\r
         if (Measurement.Handle == HandleBuffer[Index]) {\r
@@ -777,8 +777,8 @@ ProcessGlobal(
                           &Measurement.EndTimeStamp,\r
                           &Measurement.Identifier)) != 0)\r
   {\r
-    AsciiStrToUnicodeStr (Measurement.Module, mGaugeString);\r
-    AsciiStrToUnicodeStr (Measurement.Token, mUnicodeToken);\r
+    AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mGaugeString) / sizeof (mGaugeString[0]));\r
+    AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUnicodeToken) / sizeof (mUnicodeToken[0]));\r
     mGaugeString[25] = 0;\r
     mUnicodeToken[31] = 0;\r
     if ( ! ( IsPhase( &Measurement)  ||\r