diff options
author | 2025-03-14 18:53:52 +0000 | |
---|---|---|
committer | 2025-03-14 18:53:52 +0000 | |
commit | 6616c48257303a0943126478459ff2314bc1c285 (patch) | |
tree | 944c247ed06d0c12455fad9088d8efccb5fef263 /vulkan/vkjson/vkjson.h | |
parent | fe45ac6d68378df7f9b03ab31ef3bb77d7cceefb (diff) |
Fix nullpointer dereference at VKJson
Set array values of VkPhysicalDeviceVulkan14Properties.
Contributers- angrak.oh@samsung.com
Test: adb shell cmd gpu vkjson
Flag: NONE infeasible
Bug: b/403413507
Change-Id: I8df894343ec759f00f56d55f21a6ed533a15a460
Diffstat (limited to 'vulkan/vkjson/vkjson.h')
-rw-r--r-- | vulkan/vkjson/vkjson.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/vulkan/vkjson/vkjson.h b/vulkan/vkjson/vkjson.h index d74644ca8e..cfba8c58d9 100644 --- a/vulkan/vkjson/vkjson.h +++ b/vulkan/vkjson/vkjson.h @@ -33,6 +33,9 @@ #undef max #endif +/* + * This file is autogenerated by vkjson_generator.py. Do not edit directly. + */ struct VkJsonLayer { VkLayerProperties properties; std::vector<VkExtensionProperties> extensions; @@ -263,23 +266,41 @@ struct VkJsonKHRDriverProperties { }; struct VkJsonCore11 { + VkJsonCore11() { + memset(&properties, 0, sizeof(VkPhysicalDeviceVulkan11Properties)); + memset(&features, 0, sizeof(VkPhysicalDeviceVulkan11Features)); + } VkPhysicalDeviceVulkan11Properties properties; VkPhysicalDeviceVulkan11Features features; }; struct VkJsonCore12 { + VkJsonCore12() { + memset(&properties, 0, sizeof(VkPhysicalDeviceVulkan12Properties)); + memset(&features, 0, sizeof(VkPhysicalDeviceVulkan12Features)); + } VkPhysicalDeviceVulkan12Properties properties; VkPhysicalDeviceVulkan12Features features; }; struct VkJsonCore13 { + VkJsonCore13() { + memset(&properties, 0, sizeof(VkPhysicalDeviceVulkan13Properties)); + memset(&features, 0, sizeof(VkPhysicalDeviceVulkan13Features)); + } VkPhysicalDeviceVulkan13Properties properties; VkPhysicalDeviceVulkan13Features features; }; struct VkJsonCore14 { + VkJsonCore14() { + memset(&properties, 0, sizeof(VkPhysicalDeviceVulkan14Properties)); + memset(&features, 0, sizeof(VkPhysicalDeviceVulkan14Features)); + } VkPhysicalDeviceVulkan14Properties properties; VkPhysicalDeviceVulkan14Features features; + std::vector<VkImageLayout> copy_src_layouts; + std::vector<VkImageLayout> copy_dst_layouts; }; struct VkJsonDevice { @@ -306,10 +327,6 @@ struct VkJsonDevice { sizeof(VkPhysicalDeviceSamplerYcbcrConversionFeatures)); memset(&shader_draw_parameter_features, 0, sizeof(VkPhysicalDeviceShaderDrawParameterFeatures)); - memset(&core11, 0, sizeof(VkJsonCore11)); - memset(&core12, 0, sizeof(VkJsonCore12)); - memset(&core13, 0, sizeof(VkJsonCore13)); - memset(&core14, 0, sizeof(VkJsonCore14)); } VkJsonKHRVariablePointers khr_variable_pointers; VkJsonKHRShaderFloat16Int8 khr_shader_float16_int8; |