From d5f526d41bccb54ec8308a1aa01d20676ec074c3 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Thu, 24 Jun 2010 09:47:06 +0000 Subject: [PATCH] - fix memory leak in Xvnc input code (#597172) - don't crash when receive negative encoding (#600070) - explicitly disable udev configuration support --- tigervnc.spec | 12 +++++++++++- tigervnc11-rh597172.patch | 12 ++++++++++++ tigervnc11-rh600070.patch | 28 ++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 tigervnc11-rh597172.patch create mode 100644 tigervnc11-rh600070.patch diff --git a/tigervnc.spec b/tigervnc.spec index ce1418c..9a8cc0f 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -2,7 +2,7 @@ Name: tigervnc Version: 1.0.90 -Release: 0.13.%{snap}%{?dist} +Release: 0.14.%{snap}%{?dist} Summary: A TigerVNC remote display system Group: User Interface/Desktops @@ -43,6 +43,8 @@ Patch8: tigervnc-viewer-reparent.patch Patch9: tigervnc11-rh586406.patch Patch10: tigervnc11-ldnow.patch Patch11: tigervnc11-libvnc.patch +Patch12: tigervnc11-rh597172.patch +Patch13: tigervnc11-rh600070.patch %description Virtual Network Computing (VNC) is a remote display system which @@ -108,6 +110,8 @@ clients to use web browser when connect to the TigerVNC server. %patch9 -p1 -b .rh586406 %patch10 -p1 -b .ldnow %patch11 -p1 -b .libvnc +%patch12 -p1 -b .rh597172 +%patch13 -p1 -b .rh600070 cp -r /usr/share/xorg-x11-server-source/* unix/xserver pushd unix/xserver @@ -146,6 +150,7 @@ autoreconf -fiv --enable-glx \ --disable-config-dbus \ --disable-config-hal \ + --disable-config-udev \ --with-dri-driver-path=%{_libdir}/dri make %{?_smp_mflags} @@ -270,6 +275,11 @@ fi %{_datadir}/vnc/classes/* %changelog +* Thu Jun 24 2010 Adam Tkac 1.0.90-0.14.20100420svn4030 +- fix memory leak in Xvnc input code (#597172) +- don't crash when receive negative encoding (#600070) +- explicitly disable udev configuration support + * Mon Jun 14 2010 Adam Tkac 1.0.90-0.13.20100420svn4030 - update URL about SSH tunneling in the sysconfig file (#601996) diff --git a/tigervnc11-rh597172.patch b/tigervnc11-rh597172.patch new file mode 100644 index 0000000..550869b --- /dev/null +++ b/tigervnc11-rh597172.patch @@ -0,0 +1,12 @@ +diff -up tigervnc-1.0.90-20100420svn4030/unix/xserver/hw/vnc/Input.cc.rh597172 tigervnc-1.0.90-20100420svn4030/unix/xserver/hw/vnc/Input.cc +--- tigervnc-1.0.90-20100420svn4030/unix/xserver/hw/vnc/Input.cc.rh597172 2010-06-10 16:14:57.779534382 +0200 ++++ tigervnc-1.0.90-20100420svn4030/unix/xserver/hw/vnc/Input.cc 2010-06-10 16:16:24.317762477 +0200 +@@ -681,6 +681,8 @@ ModeSwitchFound: + action = down ? KeyPress : KeyRelease; + n = GetKeyboardEvents(eventq, keyboardDev, action, kc); + enqueueEvents(keyboardDev, n); ++ ++ FREE_MAPS; + + /* + * When faking a modifier we are putting a keycode (which can diff --git a/tigervnc11-rh600070.patch b/tigervnc11-rh600070.patch new file mode 100644 index 0000000..cfa7e80 --- /dev/null +++ b/tigervnc11-rh600070.patch @@ -0,0 +1,28 @@ +--- tigervnc-1.0.90-20100420svn4030/common/rfb/ConnParams.cxx.rh600070 2010-06-07 17:01:56.990676103 +0200 ++++ tigervnc-1.0.90-20100420svn4030/common/rfb/ConnParams.cxx 2010-06-07 17:02:21.518022631 +0200 +@@ -129,7 +129,7 @@ void ConnParams::setEncodings(int nEncod + encodings[i] <= pseudoEncodingQualityLevel9) { + noJpeg = false; + qualityLevel = encodings[i] - pseudoEncodingQualityLevel0; +- } else if (encodings[i] <= encodingMax && Encoder::supported(encodings[i])) ++ } else if (Encoder::supported(encodings[i])) + currentEncoding_ = encodings[i]; + } + } +--- tigervnc-1.0.90-20100420svn4030/common/rfb/Encoder.cxx.rh600070 2010-06-07 17:00:34.249636665 +0200 ++++ tigervnc-1.0.90-20100420svn4030/common/rfb/Encoder.cxx 2010-06-07 17:02:38.286209287 +0200 +@@ -34,12 +34,12 @@ EncoderCreateFnType Encoder::createFns[e + + bool Encoder::supported(int encoding) + { +- return encoding <= encodingMax && createFns[encoding]; ++ return encoding >= 0 && encoding <= encodingMax && createFns[encoding]; + } + + Encoder* Encoder::createEncoder(int encoding, SMsgWriter* writer) + { +- if (encoding <= encodingMax && createFns[encoding]) ++ if (supported(encoding)) + return (*createFns[encoding])(writer); + return 0; + }