Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/Vulkan-Loader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2022-05-27 02:25:19 +0300
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2022-05-27 20:12:46 +0300
commitb1478c3e731c4793ddd2d56c606f5e7aaf94b909 (patch)
tree747bfe41d8762f0677d88651df1918b75774e0bd
parent37c7953443a934e4deb847bb950138e7c26f6b62 (diff)
Use calloc to allocate memory for the search path
This prevents bugs where uninitialized memory is treated as a real path. It should fix an issue where sometimes CI would fail due to what appears to be a spurious path with junk characters.
-rw-r--r--loader/loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 820e2e33f..9e9ec73a2 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -3051,7 +3051,7 @@ static VkResult read_data_files_in_search_paths(const struct loader_instance *in
}
// Allocate the required space
- search_path = loader_instance_heap_alloc(inst, search_path_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
+ search_path = loader_instance_heap_calloc(inst, search_path_size, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);
if (NULL == search_path) {
loader_log(inst, VULKAN_LOADER_ERROR_BIT, 0,
"read_data_files_in_search_paths: Failed to allocate space for search path of length %d",