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-11-01 01:37:14 +0300
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2022-11-01 02:19:23 +0300
commitd4fd5773d5a004a841e2e976ef1a23aed53e8330 (patch)
tree916a98b14acbab695dc728bbda27662e1be1a28a
parentb8b1f575afb7b3da3fa8ddbe6ca5f0ad7a2d4ac0 (diff)
Null check vk_icdGetPhysicalDeviceProcAddr
Forgotten NULL check causes crashes if a driver forgets to export vk_icdGetPhysicalDeviceProcAddr but does report a 4 or higher ICD Interface Version.
-rw-r--r--loader/unknown_function_handling.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/loader/unknown_function_handling.c b/loader/unknown_function_handling.c
index 6eb6918b0..2fbb2e79e 100644
--- a/loader/unknown_function_handling.c
+++ b/loader/unknown_function_handling.c
@@ -188,6 +188,7 @@ bool loader_check_icds_for_phys_dev_ext_address(struct loader_instance *inst, co
icd_term = inst->icd_terms;
while (NULL != icd_term) {
if (icd_term->scanned_icd->interface_version >= MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION &&
+ icd_term->scanned_icd->GetPhysicalDeviceProcAddr &&
icd_term->scanned_icd->GetPhysicalDeviceProcAddr(icd_term->instance, funcName))
// this icd supports funcName
return true;