diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-06 11:26:56 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-05-12 11:48:29 +0200 |
commit | 2b40899bd3aa3229c0b27a96198333072766cfaa (patch) | |
tree | b5f3313aa2ff385cf5292680d8290a4d6e7fb909 | |
parent | a8798d8bce9a191ccd6e0692c75e38ffadba1011 (diff) | |
download | samba-2b40899bd3aa3229c0b27a96198333072766cfaa.tar.gz samba-2b40899bd3aa3229c0b27a96198333072766cfaa.tar.bz2 samba-2b40899bd3aa3229c0b27a96198333072766cfaa.zip |
s3: Slightly simplify smbd_smb2_request_next_vector
Metze, Jeremy, please check!
-rw-r--r-- | source3/smbd/smb2_server.c | 8 |
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)) { /* |