summaryrefslogtreecommitdiffstats
path: root/source/smbd/msdfs.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-07-22 03:35:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:15 -0500
commit3b505a824365222352be6a5ad2fb26586415a7a3 (patch)
tree044dcfc601e34c31b5f74a85421ece8b43d38417 /source/smbd/msdfs.c
parent524298b3f32f478e3750d805c5dc3b8fbe40d8d2 (diff)
downloadsamba-3b505a824365222352be6a5ad2fb26586415a7a3.tar.gz
samba-3b505a824365222352be6a5ad2fb26586415a7a3.tar.xz
samba-3b505a824365222352be6a5ad2fb26586415a7a3.zip
r8697: BUG 2908: make sure to allow for the trailing NULL
Diffstat (limited to 'source/smbd/msdfs.c')
-rw-r--r--source/smbd/msdfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/smbd/msdfs.c b/source/smbd/msdfs.c
index fffe44ab603..d0438b01af1 100644
--- a/source/smbd/msdfs.c
+++ b/source/smbd/msdfs.c
@@ -251,8 +251,7 @@ BOOL is_msdfs_link(connection_struct* conn, char * path,
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;