From e835d2a000a9d8d37093a1f7439e9e92892d5079 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 10 Feb 2026 10:55:02 +0100 Subject: [PATCH] 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 --- hw/xwin/glx/indirect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 102e157dde..8d281e3e1c 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -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;