diff options
Diffstat (limited to 'source4/smb_server/smb_server.c')
-rw-r--r-- | source4/smb_server/smb_server.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 7e0aa2c0cb..f891fd892c 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -101,9 +101,12 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn) if (NT_STATUS_IS_ERR(status)) { return status; } - if (nread == 0) { + if (!NT_STATUS_IS_OK(status)) { return NT_STATUS_OK; } + if (nread == 0) { + return NT_STATUS_END_OF_FILE; + } req->in.size += nread; /* when we have a full NBT header, then allocate the packet */ @@ -129,9 +132,12 @@ static NTSTATUS receive_smb_request(struct smbsrv_connection *smb_conn) if (NT_STATUS_IS_ERR(status)) { return status; } - if (nread == 0) { + if (!NT_STATUS_IS_OK(status)) { return NT_STATUS_OK; } + if (nread == 0) { + return NT_STATUS_END_OF_FILE; + } req->in.size += nread; |