svn commit: samba r8697 - branches/SAMBA_3_0/source/smbd trunk/source/smbd

jerry at samba.org jerry at samba.org
Fri Jul 22 03:35:29 GMT 2005


Author: jerry
Date: 2005-07-22 03:35:28 +0000 (Fri, 22 Jul 2005)
New Revision: 8697

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8697

Log:
BUG 2908: make sure to allow for the trailing NULL
Modified:
   branches/SAMBA_3_0/source/smbd/msdfs.c
   trunk/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/msdfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/msdfs.c	2005-07-22 01:56:51 UTC (rev 8696)
+++ branches/SAMBA_3_0/source/smbd/msdfs.c	2005-07-22 03:35:28 UTC (rev 8697)
@@ -251,8 +251,7 @@
   
 	if (S_ISLNK(sbufp->st_mode)) {
 		/* open the link and read it */
-		referral_len = SMB_VFS_READLINK(conn, path, referral, 
-						      sizeof(pstring));
+		referral_len = SMB_VFS_READLINK(conn, path, referral, sizeof(pstring)-1);
 		if (referral_len == -1) {
 			DEBUG(0,("is_msdfs_link: Error reading msdfs link %s: %s\n", path, strerror(errno)));
 			return False;

Modified: trunk/source/smbd/msdfs.c
===================================================================
--- trunk/source/smbd/msdfs.c	2005-07-22 01:56:51 UTC (rev 8696)
+++ trunk/source/smbd/msdfs.c	2005-07-22 03:35:28 UTC (rev 8697)
@@ -251,8 +251,7 @@
   
 	if (S_ISLNK(sbufp->st_mode)) {
 		/* open the link and read it */
-		referral_len = SMB_VFS_READLINK(conn, path, referral, 
-						      sizeof(pstring));
+		referral_len = SMB_VFS_READLINK(conn, path, referral, sizeof(pstring)-1);
 		if (referral_len == -1) {
 			DEBUG(0,("is_msdfs_link: Error reading msdfs link %s: %s\n", path, strerror(errno)));
 			return False;



More information about the samba-cvs mailing list