Commit 74479a99 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Emma Anholt
Browse files

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: default avatarOlivier Fourdan <ofourdan@redhat.com>
Closes: xorg/xserver#647
parent 8c4e8d9e
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment