1
0
Fork 0
OpenTTD/src/video
Peter Nelson e2a796dbcd Codefix: Potential unterminated string returned from convert_to_fs.
Converting from UTF-8 to UTF-16 could have resulted in a buffer overflow if the buffer size was exactly the length of the converted string.

Pass string_view/span to convert_from/to_fs instead, and ensure the buffer is terminated. This replaces passing a pointer to the buffer and the buffer size as separate parameters, allowing the compiler to pass both in one parameter.

Removes use of `lengthof()`.
2024-07-10 20:57:02 +01:00
..
cocoa Fix: Implement support for secure state coding on macOS 2024-05-23 19:32:29 +02:00
CMakeLists.txt Codechange: [SDL2] Split driver in base-part and default backend 2021-02-22 22:16:07 +01:00
allegro_v.cpp Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
allegro_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
dedicated_v.cpp Codechange: use infinite-fast-forward when rerunning command-log (#12519) 2024-04-17 20:01:58 +00:00
dedicated_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
null_v.cpp Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
null_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
opengl.cpp Codechange: Replace AllocatorProc with SpriteAllocator class. 2024-05-30 20:16:28 +01:00
opengl.h Codechange: Replace AllocatorProc with SpriteAllocator class. 2024-05-30 20:16:28 +01:00
sdl2_default_v.cpp Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
sdl2_default_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
sdl2_opengl_v.cpp Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
sdl2_opengl_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
sdl2_v.cpp Fix #12608: SDL keycode to vkey mapping 2024-05-07 18:33:29 +02:00
sdl2_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
sdl_v.cpp Fix #12608: SDL keycode to vkey mapping 2024-05-07 18:33:29 +02:00
sdl_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00
video_driver.cpp Fix #10079: don't render at 1000fps if HW acceleration + vsync is requested but not active (#12067) 2024-02-12 21:39:23 +00:00
video_driver.hpp Codechange: use infinite-fast-forward when rerunning command-log (#12519) 2024-04-17 20:01:58 +00:00
win32_v.cpp Codefix: Potential unterminated string returned from convert_to_fs. 2024-07-10 20:57:02 +01:00
win32_v.h Codechange: Pass std::string_view from drivers instead of char *. 2024-04-10 22:02:04 +01:00