Fix setfileinfo level 1 - it only takes 12 bytes. Found by Samba4
authorJeremy Allison <jra@samba.org>
Thu, 14 Aug 2003 23:40:45 +0000 (23:40 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 14 Aug 2003 23:40:45 +0000 (23:40 +0000)
torture tester.
Jeremy.
(This used to be commit 273ebfceb3142f485c2874f84114600d4a58c523)

source3/smbd/trans2.c

index efce768177836fc54ad7c71f0f8880c06ff57cd1..feb78e512f5914480ed3b7abee5dec74df0bb240 100644 (file)
@@ -2508,18 +2508,13 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
        switch (info_level) {
                case SMB_INFO_STANDARD:
                {
-                       if (total_data < l1_cbFile+4)
+                       if (total_data < 12)
                                return(ERROR_DOS(ERRDOS,ERRinvalidparam));
 
                        /* access time */
                        tvs.actime = make_unix_date2(pdata+l1_fdateLastAccess);
-
                        /* write time */
                        tvs.modtime = make_unix_date2(pdata+l1_fdateLastWrite);
-
-                       dosmode = SVAL(pdata,l1_attrFile);
-                       size = IVAL(pdata,l1_cbFile);
-
                        break;
                }