summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapan Shah <tapandshah@hp.com>2015-08-05 00:53:10 +0000
committershenshushi <shenshushi@Edk2>2015-08-05 00:53:10 +0000
commita8d6ea0d5c3b86a756df9c902f91cbcc490449da (patch)
tree84a34ffe4fb0fada85f863cd09e87a6377edeeab
parent7ed84968e88790c47349908098dbae7c6c039d7f (diff)
downloadedk2-platforms-a8d6ea0d5c3b86a756df9c902f91cbcc490449da.tar.xz
ShellPkg: Fix 'drivers' assert issue for a driver name longer than 35 characters.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hp.com> Reviewed-by: Chris Phillips <chrisp@hp.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18157 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
index 06bd351519..d6d75f0625 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c
@@ -282,7 +282,7 @@ ShellCommandRunDrivers (
TruncatedDriverName = NULL;
if (!SfoFlag && (FullDriverName != NULL)) {
TruncatedDriverName = AllocateZeroPool ((MAX_LEN_DRIVER_NAME + 1) * sizeof (CHAR16));
- StrCpyS (TruncatedDriverName, MAX_LEN_DRIVER_NAME + 1, FullDriverName);
+ StrnCpyS (TruncatedDriverName, MAX_LEN_DRIVER_NAME + 1, FullDriverName, MAX_LEN_DRIVER_NAME);
}
ShellPrintEx(