fixed the layout of the FULL_DIRECTORY_INFO trans2 findfirst level
authorAndrew Tridgell <tridge@samba.org>
Fri, 6 Jun 2003 04:29:41 +0000 (04:29 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 6 Jun 2003 04:29:41 +0000 (04:29 +0000)
found by samba4 smbtorture SEARCH test
(This used to be commit 5a5f59cf5eec39394b8aec4aab7f2c347d617255)

source3/smbd/trans2.c

index 70e41010a144df68a92781a92d2fd90f00aa000b..0aa0087c26a60f1e0b84549ecf7bb9a5ea393f12 100644 (file)
@@ -729,13 +729,13 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
                        SOFF_T(p,0,file_size); 
                        SOFF_T(p,8,allocation_size);
                        p += 16;
-                       SIVAL(p,0,nt_extmode); p += 4;
+                       SIVAL(p,0,nt_extmode);
                        p += 4;
-                       SIVAL(p,0,0); p += 4;
 
-                       len = srvstr_push(outbuf, p, fname, -1, 0);
-                       SIVAL(p, -4, len);
-                       p += len;
+                       SIVAL(p,4,0); /* ea size */
+                       len = srvstr_push(outbuf, p+8, fname, -1, 0);
+                       SIVAL(p, 0, len);
+                       p += 8 + len;
 
                        len = PTR_DIFF(p, pdata);
                        len = (len + 3) & ~3;