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
This commit is contained in:
Tapan Shah 2015-08-05 00:53:10 +00:00 committed by shenshushi
parent 7ed84968e8
commit a8d6ea0d5c
1 changed files with 1 additions and 1 deletions

View File

@ -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(