diff -u libxrandr-1.3.2/debian/changelog libxrandr-1.3.2/debian/changelog --- libxrandr-1.3.2/debian/changelog +++ libxrandr-1.3.2/debian/changelog @@ -1,3 +1,10 @@ +libxrandr (2:1.3.2-2ubuntu0.3) precise; urgency=low + + * fix-kwin-crashes-on-xrandr-update-on-NX.diff: Fix kwin crashing on + xrandr update, update patch to upstream (lp: #985202) + + -- Ritesh Khadgaray Mon, 02 Sep 2013 14:34:50 +0530 + libxrandr (2:1.3.2-2ubuntu0.2) precise-security; urgency=low * SECURITY UPDATE: denial of service and possible code execution via diff -u libxrandr-1.3.2/debian/patches/fix-kwin-crashes-on-xrandr-update-on-NX.diff libxrandr-1.3.2/debian/patches/fix-kwin-crashes-on-xrandr-update-on-NX.diff --- libxrandr-1.3.2/debian/patches/fix-kwin-crashes-on-xrandr-update-on-NX.diff +++ libxrandr-1.3.2/debian/patches/fix-kwin-crashes-on-xrandr-update-on-NX.diff @@ -1,28 +1,28 @@ -From 712aa60fbc837f1b35971f61deab8f3353bc6146 Mon Sep 17 00:00:00 2001 -From: Ritesh Khadgaray -Date: Tue, 5 Feb 2013 18:04:02 +0200 -Subject: [PATCH] Fix kwin crashes on xrandr update on NX. +commit 4e4bbb85499cff052ce03e173b88f1083ba83f86 +Author: Pauli Nieminen +Date: Mon Jun 14 13:45:08 2010 +0300 -https://bugs.freedesktop.org/show_bug.cgi?id=59795 + XRRUpdateConfiguration: Check if getting screen for root fails + + XRRRootToScreen might return -1 if it fails to find screen for the root + window. Following code uses screen number unconditionally to index the + screen array. + + Signed-off-by: Pauli Nieminen + Reviewed-by: Alan Coopersmith + Signed-off-by: Alan Coopersmith -Signed-off-by: Ritesh Khadgaray -Reviewed-by: Peter Hutterer ---- - src/Xrandr.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: libxrandr-1.3.2/src/Xrandr.c -=================================================================== ---- libxrandr-1.3.2.orig/src/Xrandr.c 2013-05-28 10:50:48.577399930 -0400 -+++ libxrandr-1.3.2/src/Xrandr.c 2013-05-28 10:50:48.573399930 -0400 -@@ -420,6 +420,10 @@ +diff --git a/src/Xrandr.c b/src/Xrandr.c +index b1e97ec..a9fba87 100644 +--- a/src/Xrandr.c ++++ b/src/Xrandr.c +@@ -483,6 +483,9 @@ int XRRUpdateConfiguration(XEvent *event) scevent = (XRRScreenChangeNotifyEvent *) event; - snum = XRRRootToScreen(dpy, + snum = XRRRootToScreen(dpy, ((XRRScreenChangeNotifyEvent *) event)->root); -+ /* check for return value, fails on nx */ -+ if (snum == -1 ) { -+ return 0; -+ } ++ if (snum < 0) ++ return 0; ++ if (scevent->rotation & (RR_Rotate_90 | RR_Rotate_270)) { dpy->screens[snum].width = scevent->height; dpy->screens[snum].height = scevent->width;