You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm going through your code as part of the Main Inclusion Review [1] process for Ubuntu [2], and noticed something on the loader code that is present since the deprecated loader repo [3].
It was warned by a Coverity execution on the deprecated repo but as this part of the code remained the same, I think it worth reporting so you can check if it is really a problem or not.
The possible problem is a memory overlap in terminator_CreateInstance() @ loader.c in memcpy(&icd_app_info, icd_create_info.pApplicationInfo, sizeof(icd_app_info)); as icd_create_info.pApplicationInfo can be assigned with icd_app_info address, and is inside a for loop (assign the same address and then overlap memory in memcpy)
A suggestion would be to replace memcpy with memmove for a safer copy without the risk of overlaping
Hi, I'm going through your code as part of the Main Inclusion Review [1] process for Ubuntu [2], and noticed something on the loader code that is present since the deprecated loader repo [3].
It was warned by a Coverity execution on the deprecated repo but as this part of the code remained the same, I think it worth reporting so you can check if it is really a problem or not.
The possible problem is a memory overlap in
terminator_CreateInstance()
@loader.c
inmemcpy(&icd_app_info, icd_create_info.pApplicationInfo, sizeof(icd_app_info));
asicd_create_info.pApplicationInfo
can be assigned withicd_app_info
address, and is inside afor
loop (assign the same address and then overlap memory in memcpy)A suggestion would be to replace
memcpy
withmemmove
for a safer copy without the risk of overlapingVulkan-Loader/loader/loader.c
Lines 5322 to 5330 in 0bcddf3
Do you think that this is something to be fixed?
Thanks!
[1] https://github.com/canonical/ubuntu-mir
[2] https://bugs.launchpad.net/ubuntu/+source/vulkan-tools/+bug/1946359
[3] https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers
The text was updated successfully, but these errors were encountered: