s3:smbd: Fix converity warning with _smb_setlen_large()
authorAndreas Schneider <asn@samba.org>
Wed, 16 May 2018 15:05:38 +0000 (17:05 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 16 May 2018 19:30:23 +0000 (21:30 +0200)
commit76d5f78bb8de7ed8dfbc0d6b237c6d63ea15678f
tree8ad38145ad6e0865c6066a5e1e6b7c8e703b03e1
parent25c4f8c561edb83054218d1eba9f92e41a6573c5
s3:smbd: Fix converity warning with _smb_setlen_large()

result_independent_of_operands: "(outsize - 4 & 0xffffff) >> 16 >> 8" is
0 regardless of the values of its operands. This occurs as the bitwise
first operand of "&".

So we should just pass a variable to silence the warning. However for
this, we should calculate it correctly and use size_t for it.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/smbd/aio.c
source3/smbd/error.c
source3/smbd/process.c
source3/smbd/proto.h
source3/smbd/reply.c