mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-28 07:49:59 +00:00
glamor: pixmap FBO may not be allocated
If `_glamor_create_tex()` fails to allocate the FBO because of
GL_OUT_OF_MEMORY error, the `pixmap_priv->fbo` is NULL.
However, `glamor_get_pixmap_texture()` doesn't actually check whether
the `pixmap_priv->fbo` is NULL and will segfault with a NULL pointer
dereference trying to access the `pixmap_priv->fbo->tex`.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647
(Cherry picked from commit 74479a99ec)
This commit is contained in:
committed by
Karol Herbst
parent
d0c7483b3e
commit
5bc29a67b8
@@ -136,6 +136,9 @@ glamor_get_pixmap_texture(PixmapPtr pixmap)
|
||||
if (!pixmap_priv)
|
||||
return 0;
|
||||
|
||||
if (!pixmap_priv->fbo)
|
||||
return 0;
|
||||
|
||||
if (pixmap_priv->type != GLAMOR_TEXTURE_ONLY)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user