mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 10:10:15 +01:00
glamor: Fix stack overflow in glamor_solid vertex handling.
ARRAY_SIZE(vertices) is 32 (floating point values), so we need to divide by the number of floats in a box like we do in the overflow case below. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Markus Wick <markus@selfnet.de>
This commit is contained in:
parent
d036d22a95
commit
ad3dd80720
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
|
|||
GLfloat xscale, yscale;
|
||||
float vertices[32];
|
||||
float *pvertices = vertices;
|
||||
int valid_nbox = ARRAY_SIZE(vertices);
|
||||
int valid_nbox = ARRAY_SIZE(vertices) / (4 * 2);
|
||||
|
||||
glamor_set_destination_pixmap_priv_nc(pixmap_priv);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue