From bf6558b8971ccda080d463753ddae977967e7093 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Aug 2005 12:51:05 +0000 Subject: [PATCH] r9794: r11627@blu: tridge | 2005-08-30 22:55:27 +1000 fill in correct error code for zero length and too large IPC reads --- source/ntvfs/ipc/vfs_ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ntvfs/ipc/vfs_ipc.c b/source/ntvfs/ipc/vfs_ipc.c index aa0909ceb65..3f91323fe51 100644 --- a/source/ntvfs/ipc/vfs_ipc.c +++ b/source/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) {