From edd094634ceef146415da75e925433b25fe0ac4b Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 21 Nov 2017 16:39:14 +0100 Subject: vulkan: Fix out-of-bound read G_N_ELEMENTS is the *number* of entries, not the maximum entry number CID #1417215 --- ext/vulkan/vkupload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/vulkan/vkupload.c b/ext/vulkan/vkupload.c index 8839630e9..aa4d2042b 100644 --- a/ext/vulkan/vkupload.c +++ b/ext/vulkan/vkupload.c @@ -776,7 +776,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", -- cgit v1.2.1