summaryrefslogtreecommitdiff
path: root/StdLib
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-12 17:58:30 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2012-10-12 17:58:30 +0000
commitaf230458371741f751b0dfeeae06072e013f4945 (patch)
tree1132f3825a37be119b835d2d132aee22fd9acc86 /StdLib
parente2a5ae07669c0863c58b51939fe48540fe597b29 (diff)
StdLib: Reverse a previous change resulting in string pointers that were not being incremented sufficiently to accommodate the terminating NUL.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: Fernandes, Cristiano <cristiano.fernandes@hp.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13834 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib')
-rw-r--r--StdLib/LibC/Main/Main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/StdLib/LibC/Main/Main.c b/StdLib/LibC/Main/Main.c
index 9afffff7c..5736428db 100644
--- a/StdLib/LibC/Main/Main.c
+++ b/StdLib/LibC/Main/Main.c
@@ -112,7 +112,7 @@ DEBUG_CODE_END();
string = gMD->NCmdLine;
for(count = 0; count < Argc; ++count) {
nArgv[count] = string;
- AVsz = wcstombs(string, Argv[count], nArgvSize);
+ AVsz = wcstombs(string, Argv[count], nArgvSize) + 1;
DEBUG((DEBUG_INFO, "Cvt[%d] %d \"%s\" --> \"%a\"\n", (INT32)count, (INT32)AVsz, Argv[count], nArgv[count]));
string += AVsz;
nArgvSize -= AVsz;