]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
ShellPkg: Use safe string functions to refine code.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDriver1CommandsLib / Drivers.c
index f1c2a7f7bf5d2f2d1462284555715b2ec91de7a9..06bd3515199b2d9a4cee0b034ba846305fc0a5ad 100644 (file)
@@ -2,7 +2,7 @@
   Main file for Drivers shell Driver1 function.\r
 \r
   (C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 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
@@ -282,7 +282,7 @@ ShellCommandRunDrivers (
         TruncatedDriverName = NULL;\r
         if (!SfoFlag && (FullDriverName != NULL)) {\r
           TruncatedDriverName = AllocateZeroPool ((MAX_LEN_DRIVER_NAME + 1) * sizeof (CHAR16));\r
-          StrnCpy (TruncatedDriverName, FullDriverName, MAX_LEN_DRIVER_NAME);\r
+          StrCpyS (TruncatedDriverName, MAX_LEN_DRIVER_NAME + 1, FullDriverName);\r
         }\r
 \r
         ShellPrintEx(\r