r9794: r11627@blu: tridge | 2005-08-30 22:55:27 +1000
authorAndrew Tridgell <tridge@samba.org>
Tue, 30 Aug 2005 12:51:05 +0000 (12:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:35:02 +0000 (13:35 -0500)
 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

index aa0909ceb657da749e45841bc728f3e4a2554cb4..3f91323fe512238c12acd051cc43a834dc5afce7 100644 (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) {