summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-12-07 22:43:43 +0000
committerAndrew Tridgell <tridge@samba.org>1998-12-07 22:43:43 +0000
commite50ab2b528a3dd176d98f95cb644fc6695c55318 (patch)
treefaf89393912e83609a797116450d83e2c527cf24 /source3/smbd
parent4447b6c79df51bebadc673449c50ffad13f75de1 (diff)
downloadsamba-e50ab2b528a3dd176d98f95cb644fc6695c55318.tar.gz
samba-e50ab2b528a3dd176d98f95cb644fc6695c55318.tar.bz2
samba-e50ab2b528a3dd176d98f95cb644fc6695c55318.zip
fixed warnings (and potential errors) due to integer overflow when
creating locking masks (This used to be commit 5e2844d5edb15de29b976d2ff077ffbe012b860c)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index dd1ece7fe1..6658b8926f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -574,7 +574,8 @@ static void truncate_unless_locked(files_struct *fsp, connection_struct *conn, i
BOOL *share_locked)
{
if (fsp->can_write){
- SMB_OFF_T mask = ((SMB_OFF_T)0xC) << (SMB_OFF_T_BITS-4);
+ SMB_OFF_T mask2 = ((SMB_OFF_T)0x3) << (SMB_OFF_T_BITS-4);
+ SMB_OFF_T mask = (mask2<<2);
if (is_locked(fsp,conn,~mask,0,F_WRLCK)){
/* If share modes are in force for this connection we