aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-08-14 17:55:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-14 18:27:24 -0400
commitd024709deb4997aced6140a62e8ee82b10666c5f (patch)
treec383ee45809d28079b4dcd554f9953509c57da1b /fs
parent1b0a74d1c002320d5488333dd9c72126af1aab02 (diff)
[PATCH] CIFS: Fix missing entries in search results
Fix missing entries in search results when very long file names and more than 50 (or so) of such long search entries in the directory. FindNext could send corrupt last byte of resume name when resume key was a few hundred bytes long file name or longer. Fixes Samba Bug # 2932 Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 3c628bf667a5..0db0b313d715 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2602,6 +2602,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
2602 if(name_len < PATH_MAX) { 2602 if(name_len < PATH_MAX) {
2603 memcpy(pSMB->ResumeFileName, psrch_inf->presume_name, name_len); 2603 memcpy(pSMB->ResumeFileName, psrch_inf->presume_name, name_len);
2604 byte_count += name_len; 2604 byte_count += name_len;
2605 /* 14 byte parm len above enough for 2 byte null terminator */
2606 pSMB->ResumeFileName[name_len] = 0;
2607 pSMB->ResumeFileName[name_len+1] = 0;
2605 } else { 2608 } else {
2606 rc = -EINVAL; 2609 rc = -EINVAL;
2607 goto FNext2_err_exit; 2610 goto FNext2_err_exit;