diff options
author | James McCoy <jamessan@jamessan.com> | 2017-05-03 14:42:03 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-05-03 20:27:39 -0400 |
commit | 4f75e2f95c5ef327c72ead4a7b0f7bf8c25b56ba (patch) | |
tree | b55f2d578fd988d96351c598d8fd0e2cec44bf43 /src | |
parent | 2b3cb2c448f9a7ce6132d2d0423c0d1cf627a0d3 (diff) | |
download | rneovim-4f75e2f95c5ef327c72ead4a7b0f7bf8c25b56ba.tar.gz rneovim-4f75e2f95c5ef327c72ead4a7b0f7bf8c25b56ba.tar.bz2 rneovim-4f75e2f95c5ef327c72ead4a7b0f7bf8c25b56ba.zip |
utf16_to_utf8: Allocate space for converted string and NUL
References #6646
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/mbyte.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index b21ec944c1..8a68ce0915 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -1367,7 +1367,7 @@ int utf16_to_utf8(const WCHAR *strw, char **str) return GetLastError(); } - *str = xmalloc(utf8_len); + *str = xmallocz(utf8_len); // Convert to UTF-8. utf8_len = WideCharToMultiByte(CP_UTF8, |