mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02: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)
|
static inline int ff_vk_count_images(AVVkFrame *f)
|
||||||
{
|
{
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
while (f->img[cnt])
|
while (cnt < FF_ARRAY_ELEMS(f->img) && f->img[cnt])
|
||||||
cnt++;
|
cnt++;
|
||||||
|
|
||||||
return cnt;
|
return cnt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user