summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-09-23 20:01:06 -0700
committerAndrew Tridgell <tridge@samba.org>2008-09-24 18:10:22 -0700
commitff542275c3e2bf432bcc303e95124374ada03675 (patch)
tree5718f3bb5618b46e965e9e80f149c70975a8bb03 /source4/smb_server
parenta78ac8a46be3e7c1cf3004b85aa1ec4d0330e5d2 (diff)
downloadsamba-ff542275c3e2bf432bcc303e95124374ada03675.tar.gz
samba-ff542275c3e2bf432bcc303e95124374ada03675.tar.bz2
samba-ff542275c3e2bf432bcc303e95124374ada03675.zip
stricter checking of SMB2 echo body (per the spec)
thanks to the bluearc test suite
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/smb2/keepalive.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/smb_server/smb2/keepalive.c b/source4/smb_server/smb2/keepalive.c
index f40bcc485c..d1a0ef3d72 100644
--- a/source4/smb_server/smb2/keepalive.c
+++ b/source4/smb_server/smb2/keepalive.c
@@ -54,11 +54,16 @@ void smb2srv_keepalive_recv(struct smb2srv_request *req)
{
uint16_t _pad;
- if (req->in.body_size < 0x04) {
+ if (req->in.body_size != 0x04) {
smb2srv_send_error(req, NT_STATUS_FOOBAR);
return;
}
+ if (SVAL(req->in.body, 0x00) != 0x04) {
+ smb2srv_send_error(req, NT_STATUS_INVALID_PARAMETER);
+ return;
+ }
+
_pad = SVAL(req->in.body, 0x02);
req->status = smb2srv_keepalive_backend(req);