xwin: glx: fix VLA issue

We don't wanna use VLAs, because they're inherently unsafe.
Since the values[] array can never be bigger than attrs,
just use attr's size here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-02-10 10:55:02 +01:00
committed by Enrico Weigelt
parent bb458432fb
commit e835d2a000

View File

@@ -2108,7 +2108,7 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats *
/* fill in configs */
for (i = 0; i < numConfigs; i++) {
int values[num_attrs];
int values[ARRAY_SIZE(attrs)];
GLXWinConfig temp;
GLXWinConfig *c = &temp;
GLXWinConfig *work;