Earlier we check for a NULL layer name but not here.
Vulkan-Tools-sdk-1.1.101.0/vulkaninfo/vulkaninfo.c:4403: var_deref_model: Passing null pointer "layer_name" to "strcmp", which dereferences it.
Pointed out by coverity.
printf("\tcount = %d\n", extension_count);
}
- const bool is_device_type = strcmp(layer_name, "Device") == 0;
+ const bool is_device_type = layer_name && (strcmp(layer_name, "Device") == 0);
if (is_device_type && json_output) {
printf(",\n");
printf("\t\"ArrayOfVkExtensionProperties\": [");