1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

r5973: Fix up overwrite of last 2 bytes on clilist (could cause coredump).

Jeremy.
(This used to be commit b0de2d761f6697ca1f4859ba098af6162ab42027)
This commit is contained in:
Jeremy Allison 2005-03-22 21:43:51 +00:00 committed by Gerald (Jerry) Carter
parent bf42736251
commit 47f58beb28

View File

@ -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 {