Package: rdesktop
Version: 1.6.0-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch

In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/15_lp192218.dpatch: fix -g workarea on 64 bit machines
    (LP: #192218)

Details can be found in the Ubuntu bug[1]. Basically, rdesktop assigns
an unsigned char * to an unsigned int and on 64 bit systems these are
different sizes. Comment #11 in the Ubuntu bug has full analysis. This
patch was taken from upstream[2].

Thanks for considering the patch.

[1]https://bugs.launchpad.net/ubuntu/+source/rdesktop/+bug/192218
[2]http://rdesktop.svn.sourceforge.net/viewvc/rdesktop?view=revision&revision=1550

-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-5-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u rdesktop-1.6.0/debian/control rdesktop-1.6.0/debian/control
--- rdesktop-1.6.0/debian/control
+++ rdesktop-1.6.0/debian/control
@@ -1,7 +1,7 @@
 Source: rdesktop
 Section: x11
 Priority: optional
-Maintainer: Ubuntu Core Developers <ubuntu-devel-disc...@lists.ubuntu.com>
+Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
 XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) <g...@debian.hu>
 Build-Depends: debhelper (>= 6.0.0), dpatch (>= 2.0.9), pkg-config, autotools-dev, libasound2-dev, libxt-dev, libx11-dev, libssl-dev, libsamplerate-dev
 Standards-Version: 3.8.2
@@ -17 +16,0 @@
-
diff -u rdesktop-1.6.0/debian/changelog rdesktop-1.6.0/debian/changelog
diff -u rdesktop-1.6.0/debian/patches/00list rdesktop-1.6.0/debian/patches/00list
--- rdesktop-1.6.0/debian/patches/00list
+++ rdesktop-1.6.0/debian/patches/00list
@@ -23,0 +24 @@
+15_lp192218.dpatch
only in patch2:
unchanged:
--- rdesktop-1.6.0.orig/debian/patches/15_lp192218.dpatch
+++ rdesktop-1.6.0/debian/patches/15_lp192218.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## Origin: http://rdesktop.svn.sourceforge.net/viewvc/rdesktop?view=revision&revision=1550
+## Description: _NET_WORKAREA is interpreted wrong on 64-bit machines (-g workarea)
+## Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/rdesktop/+bug/192218
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' rdesktop-1.6.0~/ewmhints.c rdesktop-1.6.0/ewmhints.c
+--- rdesktop-1.6.0~/ewmhints.c	2008-04-02 06:13:22.000000000 -0500
++++ rdesktop-1.6.0/ewmhints.c	2011-03-09 15:14:22.000000000 -0600
+@@ -135,7 +135,7 @@
+ 	int current_desktop;
+ 	unsigned long nitems_return;
+ 	unsigned char *prop_return;
+-	uint32 *return_words;
++	long *return_words;
+ 	const uint32 net_workarea_x_offset = 0;
+ 	const uint32 net_workarea_y_offset = 1;
+ 	const uint32 net_workarea_width_offset = 2;
+@@ -158,7 +158,7 @@
+ 	if (current_desktop < 0)
+ 		return -1;
+ 
+-	return_words = (uint32 *) prop_return;
++	return_words = (long *) prop_return;
+ 
+ 	*x = return_words[current_desktop * 4 + net_workarea_x_offset];
+ 	*y = return_words[current_desktop * 4 + net_workarea_y_offset];

Reply via email to