]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c
MdePkg UefiDevicePathLib: Validate before touch input buffer.
[mirror_edk2.git] / MdePkg / Library / UefiDevicePathLib / DevicePathFromText.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