CVS: rdesktop xwin.c,1.200,1.201

Peter Åstrand <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16593

Modified Files:
	xwin.c 
Log Message:
In translate24to32, only read 3 bytes from data buffer. If we are
reading 4 bytes, we are reading beyond the buffer. Fixes valgrind
warnings.


Index: xwin.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xwin.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -C2 -d -r1.200 -r1.201
*** xwin.c	27 Dec 2005 08:58:57 -0000	1.200
--- xwin.c	24 Jan 2006 12:24:40 -0000	1.201
***************
*** 803,809 ****
  		REPEAT4
  		(
! 			*((uint32 *) out) = *((uint32 *) data);
! 			out += 4;
! 			data += 3;
  		)
  #endif
--- 803,810 ----
  		REPEAT4
  		(
! 		 /* Only read 3 bytes. Reading 4 bytes means reading beyound buffer. */
! 		 *((uint32 *) out) = *((uint16 *) data) + (*((uint8 *) data + 2) << 16);
! 		 out += 4;
! 		 data += 3;
  		)
  #endif



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
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.