CVS: rdesktop xclip.c,1.43,1.44
Michael Gernoth <[email protected]> Sun, 04 Mar 2007 03:32:12 -0800
| Newsgroups | gmane.network.rdesktop.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/rdesktop/rdesktop
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1264
Modified Files:
xclip.c
Log Message:
Fixed segfaults in xclip.c:
[1657964] Copy causes segfault by Jos Dehaes
[1664930] Segmentation fault when work with VMWare on remote Windows
Index: xclip.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/xclip.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** xclip.c 8 Jan 2007 04:47:06 -0000 1.43
--- xclip.c 4 Mar 2007 11:32:09 -0000 1.44
***************
*** 290,293 ****
--- 290,296 ----
XGetAtomName(g_display, target), (unsigned) source_size));
+ if ((!source) || source_size == 0)
+ return False;
+
#ifdef USE_UNICODE_CLIPBOARD
if (target == format_string_atom ||
***************
*** 755,759 ****
{
unsigned long nitems, bytes_left;
! unsigned char *prop_return;
int format, res;
Atom type;
--- 758,762 ----
{
unsigned long nitems, bytes_left;
! unsigned char *prop_return = NULL;
int format, res;
Atom type;
***************
*** 797,801 ****
XA_INTEGER, &type, &format, &nitems, &bytes_left,
&prop_return);
! if (res != Success)
{
DEBUG_CLIPBOARD(("Requested native format but didn't specifiy which.\n"));
--- 800,804 ----
XA_INTEGER, &type, &format, &nitems, &bytes_left,
&prop_return);
! if (res != Success || (!prop_return))
{
DEBUG_CLIPBOARD(("Requested native format but didn't specifiy which.\n"));
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV