summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-08-29 02:44:38 +0000
committermidipix <writeonce@midipix.org>2019-08-29 02:44:38 +0000
commit8026377c94712d01108425a5264e91f9db5b1674 (patch)
treef13afec2b465dd7d957d2b2a5e1ccca5eed81ed5 /src/argv
parentcef942ef31af468786ba23ed27e15bd03dcca4a0 (diff)
downloadntapi-8026377c94712d01108425a5264e91f9db5b1674.tar.bz2
ntapi-8026377c94712d01108425a5264e91f9db5b1674.tar.xz
__ntapi_tt_array_convert_utf16_to_utf8(): remove buffer init requirement.
Diffstat (limited to 'src/argv')
-rw-r--r--src/argv/ntapi_tt_array_utf16.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/argv/ntapi_tt_array_utf16.c b/src/argv/ntapi_tt_array_utf16.c
index 2e1bc35..3d58b73 100644
--- a/src/argv/ntapi_tt_array_utf16.c
+++ b/src/argv/ntapi_tt_array_utf16.c
@@ -280,10 +280,12 @@ int32_t __stdcall __ntapi_tt_array_convert_utf16_to_utf8(
wch++;
}
+ /* null termination */
if (*wch)
return NT_STATUS_BUFFER_TOO_SMALL;
+ else
+ *ch++ = 0;
- ch++;
arrv++;
warrv++;
}