glcolorconvert: don't overread the end of an array

Reverse index iteration needs a - 1 for the initial value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6595>
This commit is contained in:
Matthew Waters 2024-04-10 14:58:54 +10:00 committed by GStreamer Marge Bot
parent 97b45246d1
commit 7016a96bfe

View file

@ -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);