vulkan: Fix out-of-bound read

G_N_ELEMENTS is the *number* of entries, not the maximum entry number

CID #1417215
This commit is contained in:
Edward Hervey 2017-11-21 16:39:14 +01:00 committed by Edward Hervey
parent d4afba794a
commit 87dbd558cc

View file

@ -777,7 +777,7 @@ _upload_find_method (GstVulkanUpload * vk_upload)
{
vk_upload->current_impl++;
if (vk_upload->current_impl > G_N_ELEMENTS (upload_methods))
if (vk_upload->current_impl >= G_N_ELEMENTS (upload_methods))
return FALSE;
GST_DEBUG_OBJECT (vk_upload, "attempting upload with uploader %s",