CVS: seamlessrdp/ServerExe/HookDll hookdll.c,1.17,1.18

Pierre Ossman <[email protected]>
Newsgroups gmane.network.rdesktop.cvs
Message-ID <[email protected]>
Update of /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9178/ServerExe/HookDll

Modified Files:
	hookdll.c 
Log Message:
Add filtering of dangerous characters in strings that are part of the
protocol.


Index: hookdll.c
===================================================================
RCS file: /cvsroot/rdesktop/seamlessrdp/ServerExe/HookDll/hookdll.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** hookdll.c	10 Mar 2006 15:12:28 -0000	1.17
--- hookdll.c	10 Mar 2006 16:40:57 -0000	1.18
***************
*** 116,122 ****
  					GetWindowText(hwnd, title, sizeof(title));
  
! 					/* FIXME: Strip title of dangerous characters */
! 
! 					vchannel_write("TITLE,0x%x,%s,0x%x", hwnd, title, 0);
  
  					if (style & WS_MAXIMIZE)
--- 116,121 ----
  					GetWindowText(hwnd, title, sizeof(title));
  
! 					vchannel_write("TITLE,0x%x,%s,0x%x", hwnd,
! 						       vchannel_strfilter(title), 0);
  
  					if (style & WS_MAXIMIZE)
***************
*** 167,175 ****
  
  		case WM_SETTEXT:
! 			if (!(style & WS_VISIBLE))
  				break;
! 			/* FIXME: Strip title of dangerous characters */
! 			vchannel_write("TITLE,0x%p,%s,0x%x", hwnd, (char *) lparam, 0);
! 			break;
  
  		case WM_DESTROY:
--- 166,179 ----
  
  		case WM_SETTEXT:
! 			{
! 				char *title;
! 				if (!(style & WS_VISIBLE))
! 					break;
! 				title = _strdup((char *) lparam);
! 				vchannel_write("TITLE,0x%p,%s,0x%x", hwnd,
! 					       vchannel_strfilter(title), 0);
! 				free(title);
  				break;
! 			}
  
  		case WM_DESTROY:



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&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.