summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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++;
}