From 5c28be294effad456b17655b1a08b334c32ff9f5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 12 Oct 2020 11:10:55 -0700 Subject: [PATCH] Backport another crasher fix (#1882718) --- ...-t-NULL-out-internal-of-the-default-.patch | 28 +++++++++++++++++++ libvncserver.spec | 10 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch diff --git a/0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch b/0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch new file mode 100644 index 0000000..11d0f7e --- /dev/null +++ b/0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch @@ -0,0 +1,28 @@ +From d138cf90130b0e8d5062f136ecdbcaa85e734d5d Mon Sep 17 00:00:00 2001 +From: Christian Beier +Date: Mon, 20 Jul 2020 22:33:29 +0200 +Subject: [PATCH] libvncserver: don't NULL out internal of the default cursor + +...otherwise an rfbScreen created after rfbScreenCleanup() was called +gets assigned an invalid cursor struct. +--- + libvncserver/main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libvncserver/main.c b/libvncserver/main.c +index 9149fda3..a3a711e3 100644 +--- a/libvncserver/main.c ++++ b/libvncserver/main.c +@@ -1110,7 +1110,8 @@ void rfbScreenCleanup(rfbScreenInfoPtr screen) + FREE_IF(underCursorBuffer); + TINI_MUTEX(screen->cursorMutex); + +- rfbFreeCursor(screen->cursor); ++ if(screen->cursor != &myCursor) ++ rfbFreeCursor(screen->cursor); + + #ifdef LIBVNCSERVER_HAVE_LIBZ + rfbZlibCleanup(screen); +-- +2.28.0 + diff --git a/libvncserver.spec b/libvncserver.spec index c733a32..d67a942 100644 --- a/libvncserver.spec +++ b/libvncserver.spec @@ -3,7 +3,7 @@ Summary: Library to make writing a VNC server easy Name: libvncserver Version: 0.9.13 -Release: 8%{?dist} +Release: 9%{?dist} # NOTE: --with-filetransfer => GPLv2 License: GPLv2+ @@ -20,6 +20,10 @@ Patch12: 0003-libvncserver-auth-don-t-keep-security-handlers-from-.patch # https://github.com/LibVNC/libvncserver/pull/444 # https://bugzilla.redhat.com/show_bug.cgi?id=1882718 Patch13: 0004-zlib-Clear-buffer-pointers-on-cleanup-444.patch +# Fix another crasher +# https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/issues/45 +# https://bugzilla.redhat.com/show_bug.cgi?id=1882718 +Patch14: 0001-libvncserver-don-t-NULL-out-internal-of-the-default-.patch ## downstream patches Patch102: libvncserver-LibVNCServer-0.9.13-system-crypto-policy.patch @@ -93,6 +97,7 @@ developing applications that use %{name}. %patch11 -p1 -b .tls-2 %patch12 -p1 -b .handlers %patch13 -p1 -b .pointers +%patch14 -p1 -b .cursor_null %patch102 -p1 -b .crypto_policy @@ -138,6 +143,9 @@ done %changelog +* Mon Oct 12 2020 Adam Williamson - 0.9.13-9 +- Backport another crasher fix (#1882718) + * Fri Oct 09 2020 Adam Williamson - 0.9.13-8 - Rebase all patches so Patch12 applies - Backport PR #444 to fix crash on all runs after the first (#1882718)