]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Replace UnicodeStrToAsciiStr() with UnicodeStrToAsciiStrS()
authorStar Zeng <star.zeng@intel.com>
Wed, 15 Jun 2016 05:05:00 +0000 (13:05 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 21 Jun 2016 04:46:23 +0000 (12:46 +0800)
It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49
to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with
UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c

index 961ccb5489fb45477bd260fa13d9fb5a245811d5..c167b4ce031eb37ee34f53617b1851089544087c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   DevicePathFromText protocol as defined in the UEFI 2.0 specification.\r
 \r
-Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2013 - 2016, 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
@@ -2873,7 +2873,7 @@ DevPathFromTextWiFi (
       DataLen     = 32;\r
     }\r
 \r
-    UnicodeStrToAsciiStr (SSIdStr, AsciiStr);\r
+    UnicodeStrToAsciiStrS (SSIdStr, AsciiStr, sizeof (AsciiStr));\r
     CopyMem (WiFiDp->SSId, AsciiStr, DataLen);\r
   }\r
 \r
index dfec5fa4d47d0917389ab9b0e398eaa9fa96da21..8f3cde0f6c4140df7260094bd17304aeae7ec3b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides interface to EFI_FILE_HANDLE functionality.\r
 \r
-  Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2006 - 2016, 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
@@ -1136,7 +1136,7 @@ FileHandleWriteLine(
     if (AsciiBuffer == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
-    UnicodeStrToAsciiStr (Buffer, AsciiBuffer);\r
+    UnicodeStrToAsciiStrS (Buffer, AsciiBuffer, Size);\r
     for (Index = 0; Index < Size; Index++) {\r
       if (!((AsciiBuffer[Index] >= 0) && (AsciiBuffer[Index] < 128))){\r
         FreePool(AsciiBuffer);\r