Add CRT Warnings & fix them
authorCharles Giessen <charles@lunarg.com>
Sat, 29 Jul 2023 19:02:30 +0000 (13:02 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 7 Aug 2023 22:37:56 +0000 (16:37 -0600)
commitacff43362515f7714f8dfcd3740b0bb805997222
tree90454d9b4addd690112711d6298e70f75299ed6b
parentafdd025ead2b63b2c73d900ab128a2d3b512cdf0
Add CRT Warnings & fix them

Fixes the many uses of strncpy and strncat to use versions of the functions
which the CRT approves of. This means adding the length of the destination
string as a parameter.

The function loader_platform_combine_path was removed and the single use of
it was replaced with a call to snprinf, which achieves the same goal.

There are a few other functions that the CRT warns about, like fopen and
the wide char version of strcpy. These were also replaced with the 'safe'
functions.
12 files changed:
loader/CMakeLists.txt
loader/asm_offset.c
loader/cJSON.c
loader/dirent_on_windows.c
loader/loader.c
loader/loader.h
loader/loader_environment.c
loader/loader_windows.c
loader/log.c
loader/settings.c
loader/unknown_function_handling.c
loader/vk_loader_platform.h