From 6a0c1d0baf2f185e0a8bf739af20c54472626678 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 14 Aug 2003 23:40:45 +0000 Subject: Fix setfileinfo level 1 - it only takes 12 bytes. Found by Samba4 torture tester. Jeremy. (This used to be commit 273ebfceb3142f485c2874f84114600d4a58c523) --- source3/smbd/trans2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index efce768177..feb78e512f 100644 --- a/source3/smbd/trans2.c +++ b/source3/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; } -- cgit