summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-22 21:43:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:14 -0500
commit47f58beb282bcc80993329a1cf3e7002141ab8fb (patch)
tree358b2e6b04342692ef8836c078dc3f4eebc64554 /source3
parentbf427362514bc24a0f433ffecdea7da2db2bece1 (diff)
downloadsamba-47f58beb282bcc80993329a1cf3e7002141ab8fb.tar.gz
samba-47f58beb282bcc80993329a1cf3e7002141ab8fb.tar.bz2
samba-47f58beb282bcc80993329a1cf3e7002141ab8fb.zip
r5973: Fix up overwrite of last 2 bytes on clilist (could cause coredump).
Jeremy. (This used to be commit b0de2d761f6697ca1f4859ba098af6162ab42027)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clilist.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 5138bca8df..33bf32bb94 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -281,14 +281,11 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
dirlist = tdl;
}
- /* put in a length for the last entry, to ensure we can chain entries
- into the next packet */
+ /* we might need the lastname for continuations */
for (p2=p,i=0;i<ff_searchcount;i++) {
p2 += interpret_long_filename(cli,info_level,p2,&finfo);
}
- SSVAL(p2,0,data_len - PTR_DIFF(p2,p));
- /* we might need the lastname for continuations */
if (ff_lastname > 0) {
pstrcpy(mask, finfo.name);
} else {