mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-19 13:27:00 +00:00
avutil/vulkan: avoid overreads in ff_vk_count_images
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
03275b0f09
commit
f6f06fb42a
@ -271,7 +271,7 @@ typedef struct FFVulkanContext {
|
||||
static inline int ff_vk_count_images(AVVkFrame *f)
|
||||
{
|
||||
int cnt = 0;
|
||||
while (f->img[cnt])
|
||||
while (cnt < FF_ARRAY_ELEMS(f->img) && f->img[cnt])
|
||||
cnt++;
|
||||
|
||||
return cnt;
|
||||
|
Loading…
Reference in New Issue
Block a user