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
					
				| 
						 | 
				
			
			@ -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…
	
		Reference in New Issue