MSAN fixes
authorShahbaz Youssefi <syoussefi@google.com>
Fri, 8 Sep 2023 13:39:28 +0000 (09:39 -0400)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 8 Sep 2023 15:31:54 +0000 (09:31 -0600)
loader/loader_linux.c
loader/log.c

index 2918b6b4f5d8acda2824a48cb1fcd592224c5408..189ddd37b773556b31a5cb2f828a57fe79c106a2 100644 (file)
@@ -269,7 +269,7 @@ VkResult linux_read_sorted_physical_devices(struct loader_instance *inst, uint32
             bool device_is_1_1_capable =
                 loader_check_version_meets_required(LOADER_VERSION_1_1_0, loader_make_version(dev_props.apiVersion));
             if (!sorted_device_info[index].has_pci_bus_info) {
-                uint32_t ext_count;
+                uint32_t ext_count = 0;
                 icd_term->dispatch.EnumerateDeviceExtensionProperties(sorted_device_info[index].physical_device, NULL, &ext_count,
                                                                       NULL);
                 if (ext_count > 0) {
index f65eb190d7acfa4c48088bb321adf0a26a1b6094..2474317ba224f84afacab2c33f0dc032b660db8f 100644 (file)
@@ -92,7 +92,7 @@ uint32_t loader_get_global_debug_level(void) { return g_loader_debug; }
 
 void loader_log(const struct loader_instance *inst, VkFlags msg_type, int32_t msg_code, const char *format, ...) {
     (void)msg_code;
-    char msg[512];
+    char msg[512] = {0};
 
     va_list ap;
     va_start(ap, format);