diff options
author | Marvin Scholz <epirat07@gmail.com> | 2024-10-09 02:12:39 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-10-09 02:36:12 +0200 |
commit | f5e2914a89c2d1c38d3ac80ae43c0eda743892f3 (patch) | |
tree | 4a87ac42b39b1c615d714dc671934ae6b202b4df /libavutil/vulkan.c | |
parent | e6ecc1e7572d2c61aec8b45e61b1fa524fa4e060 (diff) | |
download | ffmpeg-f5e2914a89c2d1c38d3ac80ae43c0eda743892f3.tar.gz |
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.
Diffstat (limited to 'libavutil/vulkan.c')
-rw-r--r-- | libavutil/vulkan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 7ad938b047..4a194ff082 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -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); |