forked from FFmpeg/FFmpeg
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue