]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellCommandLib/ConsistMapping.c
ShellPkg: Use safe string functions to refine code.
[mirror_edk2.git] / ShellPkg / Library / UefiShellCommandLib / ConsistMapping.c
index 368d6a487b87cee5618c25012a81c68da959f488..9bd7b2cedd25728276a031226b0d3165300c1cf0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Main file for support of shell consist mapping.\r
 \r
-  Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2005 - 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
@@ -116,7 +116,7 @@ CatPrint (
     ASSERT (Str->Str != NULL);\r
   }\r
 \r
-  StrnCat (Str->Str, AppendStr, StringSize/sizeof(CHAR16) - 1 - StrLen(Str->Str));\r
+  StrCatS (Str->Str, StringSize/sizeof(CHAR16), AppendStr);\r
   Str->Len = StringSize;\r
 \r
   FreePool (AppendStr);\r