summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-05-06 11:26:56 +0200
committerVolker Lendecke <vl@samba.org>2011-05-12 11:48:29 +0200
commit2b40899bd3aa3229c0b27a96198333072766cfaa (patch)
treeb5f3313aa2ff385cf5292680d8290a4d6e7fb909 /source3/smbd
parenta8798d8bce9a191ccd6e0692c75e38ffadba1011 (diff)
downloadsamba-2b40899bd3aa3229c0b27a96198333072766cfaa.tar.gz
samba-2b40899bd3aa3229c0b27a96198333072766cfaa.tar.bz2
samba-2b40899bd3aa3229c0b27a96198333072766cfaa.zip
s3: Slightly simplify smbd_smb2_request_next_vector
Metze, Jeremy, please check!
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_server.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 1bb3cc22ce..7752fb07b5 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2018,9 +2018,11 @@ static int smbd_smb2_request_next_vector(struct tstream_context *stream,
invalid = true;
}
- if ((body_size % 2) != 0) {
- body_size -= 1;
- }
+ /*
+ * Mask out the lowest bit, the "dynamic" part
+ * of body_size.
+ */
+ body_size &= ~1;
if (body_size > (full_size - SMB2_HDR_BODY)) {
/*