diff options
Diffstat (limited to 'ShellPkg/Application/Shell/ShellParametersProtocol.c')
-rw-r--r-- | ShellPkg/Application/Shell/ShellParametersProtocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c b/ShellPkg/Application/Shell/ShellParametersProtocol.c index 9d769541c6..75704b4ae0 100644 --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c @@ -85,7 +85,11 @@ GetNextParameter( StrCpy(*TempParameter, L"");
*Walker = NextDelim + 1;
} else if (NextDelim != NULL) {
- StrnCpy(*TempParameter, (*Walker)+1, NextDelim - ((*Walker)+1));
+
+ //
+ // Copy ensuring that both quotes are left in place.
+ //
+ StrnCpy(*TempParameter, (*Walker), NextDelim - *Walker + 1);
*Walker = NextDelim + 1;
} else {
//
|