aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2020-05-09 18:26:31 +1000
committerArmin Kuster <akuster808@gmail.com>2020-05-17 14:41:35 -0700
commit7601fbcf5c3f5e44072b55656af161e7e64beb79 (patch)
tree3917fa0a899021b7987f1fcdd41be1d0522cbc8b /meta-oe/recipes-graphics
parent07f1e0be8d428d0a643dad67adf81dd76ce53579 (diff)
downloadmeta-openembedded-7601fbcf5c3f5e44072b55656af161e7e64beb79.tar.gz
x11vnc: fix xfc NULL pointer dereference
Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit d8eecca63640b47d02665fa9c4caabc9776b830d) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r--meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch30
-rw-r--r--meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch b/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch
new file mode 100644
index 0000000000..a571ba2838
--- /dev/null
+++ b/meta-oe/recipes-graphics/x11vnc/files/src-cursor-fix-xfc-NULL-pointer-dereference.patch
@@ -0,0 +1,30 @@
+From 95a10ab64c2dbbec2c8dad91a5ffb73a0d68474b Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 16 Mar 2020 20:04:06 +1100
+Subject: [PATCH] src/cursor: fix xfc NULL pointer dereference
+
+xfc->width and xfc->height for the XFixes cursor image returned from
+XFixesGetCursorImage(dpy) are accessed without first checking that xfc
+is not NULL. This can result in the server sometimes crashing when
+moving a Google Chrome window.
+
+Fixes: 37c946191a0f ("Broken cursor bugfix for 64 bit systems (#49)")
+Upstream-Status: Accepted
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ src/cursor.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/cursor.c b/src/cursor.c
+index 39e73a6..74a08c6 100644
+--- a/src/cursor.c
++++ b/src/cursor.c
+@@ -1311,7 +1311,7 @@ static int get_exact_cursor(int init) {
+
+ /* retrieve the cursor info + pixels from server: */
+ xfc = XFixesGetCursorImage(dpy);
+- {
++ if (xfc) {
+ /* 2017-07-09, Stephan Fuhrmann: This fixes an implementation flaw for 64 bit systems.
+ * The XFixesCursorImage structure says xfc->pixels is (unsigned long*) in the structure, but
+ * the protocol spec says it's 32 bit per pixel
diff --git a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
index 0d84c420a1..e3a1914fef 100644
--- a/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
+++ b/meta-oe/recipes-graphics/x11vnc/x11vnc_0.9.16.bb
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/LibVNC/x11vnc \
file://starting-fix.patch \
file://0001-misc-Makefile.am-don-t-install-Xdummy-when-configure.patch \
file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
+ file://src-cursor-fix-xfc-NULL-pointer-dereference.patch \
"
S = "${WORKDIR}/git"