diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-12 17:58:30 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-10-12 17:58:30 +0000 |
commit | af230458371741f751b0dfeeae06072e013f4945 (patch) | |
tree | 1132f3825a37be119b835d2d132aee22fd9acc86 | |
parent | e2a5ae07669c0863c58b51939fe48540fe597b29 (diff) | |
download | edk2-af230458371741f751b0dfeeae06072e013f4945.zip edk2-af230458371741f751b0dfeeae06072e013f4945.tar.gz edk2-af230458371741f751b0dfeeae06072e013f4945.tar.bz2 |
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
-rw-r--r-- | StdLib/LibC/Main/Main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/StdLib/LibC/Main/Main.c b/StdLib/LibC/Main/Main.c index 9afffff..5736428 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;
|