diff options
author | Jeremy Allison <jra@samba.org> | 2003-08-14 23:40:45 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-08-14 23:40:45 +0000 |
commit | 273ebfceb3142f485c2874f84114600d4a58c523 (patch) | |
tree | da3f71ef67a9ba6c38a8adf3a5ff069e980baec4 | |
parent | 97e1d5c9573513c9c9be9a709341bda54fbe44be (diff) | |
download | samba-273ebfceb3142f485c2874f84114600d4a58c523.tar.gz samba-273ebfceb3142f485c2874f84114600d4a58c523.tar.xz samba-273ebfceb3142f485c2874f84114600d4a58c523.zip |
Fix setfileinfo level 1 - it only takes 12 bytes. Found by Samba4
torture tester.
Jeremy.
-rw-r--r-- | source/smbd/trans2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index efce7681778..feb78e512f5 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -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; } |