mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] egl: fix buffer overflow in desktop_rects module
The module has been changed to support variable amount of rectangles, so we should just allocate a VLA.
This commit is contained in:
parent
543c97987b
commit
3f8c7c8d0d
@ -107,7 +107,7 @@ inline static void rectToVertices(GLfloat * vertex, const FrameDamageRect * rect
|
|||||||
void egl_desktopRectsUpdate(EGL_DesktopRects * rects, const struct DamageRects * data,
|
void egl_desktopRectsUpdate(EGL_DesktopRects * rects, const struct DamageRects * data,
|
||||||
int width, int height)
|
int width, int height)
|
||||||
{
|
{
|
||||||
GLfloat vertices[KVMFR_MAX_DAMAGE_RECTS * 8];
|
GLfloat vertices[(!data || data->count < 0 ? 1 : data->count) * 8];
|
||||||
if (!data || data->count < 0)
|
if (!data || data->count < 0)
|
||||||
{
|
{
|
||||||
FrameDamageRect full = {
|
FrameDamageRect full = {
|
||||||
|
Loading…
Reference in New Issue
Block a user