1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r9794: r11627@blu: tridge | 2005-08-30 22:55:27 +1000

fill in correct error code for zero length and too large IPC reads
This commit is contained in:
Andrew Tridgell 2005-08-30 12:51:05 +00:00 committed by Gerald (Jerry) Carter
parent b7c09df9e5
commit bf6558b897

View File

@ -372,7 +372,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
DATA_BLOB data;
uint16_t fnum;
struct pipe_state *p;
NTSTATUS status = NT_STATUS_FOOBAR;
NTSTATUS status = NT_STATUS_OK;
if (rd->generic.level != RAW_READ_GENERIC) {
return ntvfs_map_read(req, rd, ntvfs);
@ -388,7 +388,7 @@ static NTSTATUS ipc_read(struct ntvfs_module_context *ntvfs,
data.length = rd->readx.in.maxcnt;
data.data = rd->readx.out.data;
if (data.length > UINT16_MAX) {
data.length = 0;
data.length = UINT16_MAX;
}
if (data.length != 0) {