From 89e550ba34d1f00b576aae3d4683ca9ca36afe80 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Aug 2005 12:51:05 +0000 Subject: 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 used to be commit bf6558b8971ccda080d463753ddae977967e7093) --- source4/ntvfs/ipc/vfs_ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/ipc') diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index aa0909ceb6..3f91323fe5 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -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) { -- cgit