Add dst_size parameter to character conv funcs
Character conversion functions did not previously ask for a maximum buffer size for their 'dst' parameter, it's unsafe to assume some given destination buffer may have enough size to accommodate a conversion.
This commit is contained in:
@@ -78,6 +78,6 @@ string GetDefaultVideoSavePath()
|
||||
SHGetFolderPathW(NULL, CSIDL_MYVIDEO, NULL, SHGFP_TYPE_CURRENT,
|
||||
path_utf16);
|
||||
|
||||
os_wcs_to_utf8(path_utf16, wcslen(path_utf16), path_utf8);
|
||||
os_wcs_to_utf8(path_utf16, wcslen(path_utf16), path_utf8, MAX_PATH);
|
||||
return string(path_utf8);
|
||||
}
|
||||
|
Reference in New Issue
Block a user