[ rdesktop-Patches-1970489 ] NET_WM_ICON segfault on x86_64

"SourceForge.net" <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Patches item #1970489, was opened at 2008-05-23 15:41
Message generated for change (Comment added) made by psychonaut25
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381349&aid=1970489&group_id=24366

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: NET_WM_ICON segfault on x86_64

Initial Comment:
On x86_64 using 1.6.0 and seamlessrdp I get a segfault in ewmh_set_icon and ewmh_del_icon.  To reproduce: use rdesktop to seamlessrdp load IE on XP SP2, start browsing, boom.

http://2006.planet-soc.com/node/265/ explains why fault occurred (same problem, different project):

"Problem was in X functions XChangeProperty and XGetWindowProperty. They are used to set/retrieve some additional information associated with X windows. One of their arguments is 'format', which (on 32bit machines) says the size of one 'item' stored in property. The functions then expect array of these items. But, there is an important phrase in manpage, which was overlooked: " If the returned format is 32, the returned data is represented as a long array...". And the important thing is, that on x86_64, size of long is not 32, but 64 bits. The function expects array of 'long's, from which it always takes lower 32bit and discards the rest. So the resulted data which were stored and consecutively retrieved with old method, missed every odd 'int'. And, with data damaged this way, rdesktop cou
 ld crash."

Patch to fix this is attached - changes using uint32s in a few places to unsigned longs.  Tested and fixed my x86_64 box, should be a no-op on i386...

Cheers,

Jim

----------------------------------------------------------------------

Comment By: Tristan Miller (psychonaut25)
Date: 2009-10-06 12:50

Message:
This patch also fixes Bug 2168354, so I've marked it as a duplicate.

----------------------------------------------------------------------

Comment By: ChD (chd-fr)
Date: 2009-10-05 11:38

Message:
Very useful patch while using seamlessrdp on x86_64. Otherwise, rdesktop
crashes each time a window is opened or closed.
So, like said yeroc : "What needs to be done to get this patch applied to
version control so this gets fixed in an official release?"

----------------------------------------------------------------------

Comment By: Corey Puffalt (yeroc)
Date: 2009-09-24 23:16

Message:
What needs to be done to get this patch applied to version control so this
gets fixed in an official release?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381349&aid=1970489&group_id=24366

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.