CVS: rdesktop disk.c,1.42,1.43

Erik Forsberg <[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-serv26981

Modified Files:
	disk.c 
Log Message:
Disk unit names seem to be truncated at seven characters on the WTS,
and I can't see any field allowing for longer names. This is not very
surprising, since native clients export drive names ("A", "H" etc.).

Telling the user that the name is truncated at seven, not eight,
characters.


Index: disk.c
===================================================================
RCS file: /cvsroot/rdesktop/rdesktop/disk.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** disk.c	14 Feb 2005 00:34:23 -0000	1.42
--- disk.c	21 Feb 2005 12:39:34 -0000	1.43
***************
*** 267,272 ****
  		pos2 = next_arg(optarg, '=');
  
! 		strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name));
! 		if (strlen(optarg) > 8)
  			fprintf(stderr, "share name %s truncated to %s\n", optarg,
  				g_rdpdr_device[*id].name);
--- 267,272 ----
  		pos2 = next_arg(optarg, '=');
  
! 		strncpy(g_rdpdr_device[*id].name, optarg, sizeof(g_rdpdr_device[*id].name)-1);
! 		if (strlen(optarg) > (sizeof(g_rdpdr_device[*id].name)-1))
  			fprintf(stderr, "share name %s truncated to %s\n", optarg,
  				g_rdpdr_device[*id].name);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
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.