[ 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 (Settings changed) made by astrand
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: Closed
>Resolution: Accepted
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 could 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: Peter Åstrand (astrand)
Date: 2010-01-18 09:06

Message:
I have now applied the attached patch, plus made the memcpy adjustment
suggested by comment "2009-10-14 14:35". 

I've also marked #1967935 as a duplicate of this tracker item. Closing. 

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

Comment By: Peter Åstrand (astrand)
Date: 2010-01-18 08:38

Message:
I've marked #2928281 as a duplicate of this tracker. 

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

Comment By: TRK (ribenakid)
Date: 2009-10-14 23:07

Message:
I would've submitted a revised patch, but I can't figure out how to attach
files to these tracker entries.

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

Comment By: Nobody/Anonymous (nobody)
Date: 2009-10-14 14:59

Message:
Maybe you might want to propose a revised patch?

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

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

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
rdesktop-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
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.