]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r5973: Fix up overwrite of last 2 bytes on clilist (could cause coredump).
authorJeremy Allison <jra@samba.org>
Tue, 22 Mar 2005 21:43:51 +0000 (21:43 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:56:14 +0000 (10:56 -0500)
Jeremy.

source/libsmb/clilist.c

index 5138bca8df17b1fe670cbc844bbfa2db61873ce7..33bf32bb94f3025a2c9c4f383f85030539477d77 100644 (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 {