From 7016a96bfe9b7b59bd27490c3ac1187e96cecb65 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 10 Apr 2024 14:58:54 +1000 Subject: [PATCH] glcolorconvert: don't overread the end of an array Reverse index iteration needs a - 1 for the initial value. Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c index c20197c4b5..e0cdb842a7 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c @@ -2604,7 +2604,7 @@ _init_convert (GstGLColorConvert * convert) info->cms_coeff3); } - for (i = info->in_n_textures; i >= 0; i--) { + for (i = info->in_n_textures - 1; i >= 0; i--) { if (info->shader_tex_names[i]) gst_gl_shader_set_uniform_1i (convert->shader, info->shader_tex_names[i], i);