mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 06:21:14 +00:00
x11/gl: Fix use after free
https://bugzilla.gnome.org/show_bug.cgi?id=747305 Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
This commit is contained in:
parent
2c61a52ff6
commit
49ec67c7eb
@ -309,9 +309,9 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
|||||||
{
|
{
|
||||||
Display *display = cairo_xlib_surface_get_display (surface);
|
Display *display = cairo_xlib_surface_get_display (surface);
|
||||||
Screen *screen = cairo_xlib_surface_get_screen (surface);
|
Screen *screen = cairo_xlib_surface_get_screen (surface);
|
||||||
Visual *visual = cairo_xlib_surface_get_visual (surface);;
|
Visual *visual = cairo_xlib_surface_get_visual (surface);
|
||||||
GdkGLXPixmap *glx_pixmap;
|
GdkGLXPixmap *glx_pixmap;
|
||||||
GLXFBConfig *fbconfigs;
|
GLXFBConfig *fbconfigs, config;
|
||||||
int nfbconfigs;
|
int nfbconfigs;
|
||||||
XVisualInfo *visinfo;
|
XVisualInfo *visinfo;
|
||||||
VisualID visualid;
|
VisualID visualid;
|
||||||
@ -393,6 +393,7 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
|||||||
if (value == TRUE)
|
if (value == TRUE)
|
||||||
y_inverted = TRUE;
|
y_inverted = TRUE;
|
||||||
|
|
||||||
|
config = fbconfigs[i];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +408,7 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
|
|||||||
glx_pixmap = g_slice_new0 (GdkGLXPixmap);
|
glx_pixmap = g_slice_new0 (GdkGLXPixmap);
|
||||||
glx_pixmap->y_inverted = y_inverted;
|
glx_pixmap->y_inverted = y_inverted;
|
||||||
glx_pixmap->display = display;
|
glx_pixmap->display = display;
|
||||||
glx_pixmap->drawable = glXCreatePixmap (display, fbconfigs[i],
|
glx_pixmap->drawable = glXCreatePixmap (display, config,
|
||||||
cairo_xlib_surface_get_drawable (surface),
|
cairo_xlib_surface_get_drawable (surface),
|
||||||
pixmap_attributes);
|
pixmap_attributes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user