You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
libavutil/vulkan: fix flexible array struct allocation
The flexible array member struct can have padding added by the compiler which was not taken into account properly, which could lead to a heap buffer overflow.
This commit is contained in:
@ -646,7 +646,7 @@ int ff_vk_exec_add_dep_bool_sem(FFVulkanContext *s, FFVkExecContext *e,
|
||||
return 0;
|
||||
}
|
||||
|
||||
buf_size = sizeof(int) + sizeof(VkSemaphore)*nb;
|
||||
buf_size = sizeof(*ts) + sizeof(VkSemaphore)*nb;
|
||||
ts = av_mallocz(buf_size);
|
||||
if (!ts) {
|
||||
err = AVERROR(ENOMEM);
|
||||
|
Reference in New Issue
Block a user