mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
utf16_to_utf8: Allocate space for converted string and NUL
References #6646
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user