[cairo-commit] 2 commits - src/cairo-xlib-surface-shm.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 29 09:18:09 UTC 2021


 src/cairo-xlib-surface-shm.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 4c4e6127f45ce8b761acfbc2b1a0548a1535aa9d
Merge: 64e1fd70e cb86c13b6
Author: Emmanuele Bassi <ebassi at gmail.com>
Date:   Thu Apr 29 09:18:07 2021 +0000

    Merge branch 'jfkthame-master-patch-60864' into 'master'
    
    Don't leave the shm field uninitialized when building without shm support.
    
    See merge request cairo/cairo!170

commit cb86c13b626f098ce4e65072a375494993548ebe
Author: Jonathan Kew <jfkthame at googlemail.com>
Date:   Thu Apr 29 08:52:31 2021 +0000

    Don't leave the shm field uninitialized when building without shm support.
    
    This can result in reading an uninitialized value in draw_image_boxes() in cairo-xlib-render-compositor.c.

diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index ccdaf4cbc..10f947d9c 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -43,7 +43,10 @@
 #include "cairo-xlib-surface-private.h"
 
 #if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H)
-void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {}
+void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
+{
+    display->shm = NULL;
+}
 
 cairo_surface_t *
 _cairo_xlib_surface_get_shm (cairo_xlib_surface_t *surface,


More information about the cairo-commit mailing list