The Samba-Bugzilla – Attachment 5268 Details for
Bug 7081
vfs_expand_msdfs doesn't work correctly (with fix identified)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second part of patch for 3.4.6.
0001-s3-Simplify-the-code-a-bit-Catch-len-0-early.patch (text/plain), 1.05 KB, created by
Jeremy Allison
on 2010-02-03 16:07:44 UTC
(
hide
)
Description:
Second part of patch for 3.4.6.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-02-03 16:07:44 UTC
Size:
1.05 KB
patch
obsolete
>From 1cc14e22438b5b5963f03564ac3863045a49bd09 Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Wed, 3 Feb 2010 14:06:25 -0800 >Subject: [PATCH] s3: Simplify the code a bit: Catch (len==0) early > >--- > source3/modules/vfs_expand_msdfs.c | 11 ++++------- > 1 files changed, 4 insertions(+), 7 deletions(-) > >diff --git a/source3/modules/vfs_expand_msdfs.c b/source3/modules/vfs_expand_msdfs.c >index f58af20..59f6f7a 100644 >--- a/source3/modules/vfs_expand_msdfs.c >+++ b/source3/modules/vfs_expand_msdfs.c >@@ -187,7 +187,7 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle, > result = SMB_VFS_NEXT_READLINK(handle, path, target, > PATH_MAX); > >- if (result < 0) >+ if (result <= 0) > return result; > > target[result] = '\0'; >@@ -202,12 +202,9 @@ static int expand_msdfs_readlink(struct vfs_handle_struct *handle, > } > > len = MIN(bufsiz, strlen(target)); >- if (len) { >- memcpy(buf, target, len); >- } else { >- errno = ENOENT; >- return -1; >- } >+ >+ memcpy(buf, target, len); >+ > TALLOC_FREE(target); > return len; > } >-- >1.6.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7081
:
5258
|
5263
|
5264
|
5267
| 5268