aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/glxdri2.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/glxdri2.c')
-rw-r--r--xorg-server/glx/glxdri2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index c756bf570..5a8966f74 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -475,7 +475,7 @@ create_driver_context(__GLXDRIcontext * context,
context->driContext = NULL;
if (screen->dri2->base.version >= 3) {
- uint32_t ctx_attribs[3 * 2];
+ uint32_t ctx_attribs[4 * 2];
unsigned num_ctx_attribs = 0;
unsigned dri_err = 0;
unsigned major_ver;
@@ -510,6 +510,8 @@ create_driver_context(__GLXDRIcontext * context,
__DRI_CTX_ATTRIB_RESET_STRATEGY;
ctx_attribs[num_ctx_attribs++] = reset;
}
+
+ assert(num_ctx_attribs <= ARRAY_SIZE(ctx_attribs));
}
context->driContext =