flutter/packages/flutter_tools/templates/app_shared/windows.tmpl
Chris Bracken b5d3c43280
Check string size before Win32 MultiByte <-> WideChar conversions (#99729)
This patch adds an additional check to ensure the target length of a string is within the supported maximum string length prior to calling WideCharToMultiByte/MultiByteToWideChar in the Windows runner template.

This is to prevent resize() from failing if called with a count > std::string::max_size().

According to Win32 API docs (WideCharToMultiByte, MultiByteToWideChar) it's the caller responsibility to make sure the buffers are correctly allocated.

Authored by: Tomasz Gucio <tgucio@gmail.com>
2022-03-07 19:57:36 -08:00
..
flutter Document template CMake files (#96534) 2022-01-14 14:55:14 -08:00
runner Check string size before Win32 MultiByte <-> WideChar conversions (#99729) 2022-03-07 19:57:36 -08:00
.gitignore Add a more complete app template for Flutter (skeleton) (#83530) 2021-06-28 15:26:04 -07:00
CMakeLists.txt.tmpl Document template CMake files (#96534) 2022-01-14 14:55:14 -08:00