From a2f003e3b90ceed0e871c1917f22b00e6b36d000 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 May 2002 20:52:09 +0000 Subject: Fix bug where setting end of file length to 8 was hitting erroneous check for OS/2 EA set. This caused Macromedia movie files to not export correctly onto a Samba share. Originally spotted by Michel Stoop stoop@ncg.nl. Jeremy. (This used to be commit 6b4affde167104c760bd8dc3c8906511a7642853) --- source3/smbd/trans2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 77cd43f04f..d5c445c5f3 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2076,6 +2076,9 @@ static int call_trans2setfilepathinfo(connection_struct *conn, case SMB_INFO_STANDARD: case SMB_INFO_QUERY_EA_SIZE: { + if (total_data < l1_cbFile+4) + return(ERROR_DOS(ERRDOS,ERRinvalidparam)); + /* access time */ tvs.actime = make_unix_date2(pdata+l1_fdateLastAccess); @@ -2084,6 +2087,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, mode = SVAL(pdata,l1_attrFile); size = IVAL(pdata,l1_cbFile); + break; } -- cgit