summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2017-11-21 16:39:14 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-12-01 10:51:34 +0100
commitedd094634ceef146415da75e925433b25fe0ac4b (patch)
tree423c4ce0f9a7a9fc9b4e346d50ae0c4a673c0edb
parentbc77afb644ce2dc86d204991d211e423904765c2 (diff)
downloadgstreamer-plugins-bad-edd094634ceef146415da75e925433b25fe0ac4b.tar.gz
vulkan: Fix out-of-bound read
G_N_ELEMENTS is the *number* of entries, not the maximum entry number CID #1417215
-rw-r--r--ext/vulkan/vkupload.c2
1 files changed, 1 insertions, 1 deletions
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",