[ rdesktop-Bugs-2956486 ] On session redirect, username get truncated

"SourceForge.net" <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
Bugs item #2956486, was opened at 2010-02-22 09:33
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381347&aid=2956486&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: Internals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alexandre Beloin (abeloin)
Assigned to: Nobody/Anonymous (nobody)
Summary: On session redirect, username get truncated

Initial Comment:
Project: rDesktop / trunk
Revision: 1563

When a session gets redirected, rDesktop give the authentication credentials to the new session but the username is truncated to the declared size of the array.

Fix it by changing line 977 from sizeof to strlen to:
STRNCPY(g_username, g_redirect_username, strlen(g_username) + 1);

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

Comment By: Nobody/Anonymous (nobody)
Date: 2010-07-28 14:15

Message:
This does indeed fix the issue of the incorrect user name. However, I still
get an error (Warning: server sent an unexpectedly long string,
truncating), seems to be linked to this issue:
http://sourceforge.net/tracker/?func=detail&aid=2845414&group_id=24366&atid=381347

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

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

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
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.