svn commit: samba r3239 - in branches/SAMBA_4_0/source/ntvfs/ipc: .
tridge at samba.org
tridge at samba.org
Tue Oct 26 05:36:14 GMT 2004
Author: tridge
Date: 2004-10-26 05:36:14 +0000 (Tue, 26 Oct 2004)
New Revision: 3239
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/ipc&rev=3239&nolog=1
Log:
reads of more than UINT16_MAX bytes should return 0 bytes
Modified:
branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2004-10-26 05:35:26 UTC (rev 3238)
+++ branches/SAMBA_4_0/source/ntvfs/ipc/vfs_ipc.c 2004-10-26 05:36:14 UTC (rev 3239)
@@ -365,19 +365,25 @@
}
fnum = rd->readx.in.fnum;
- data.length = rd->readx.in.maxcnt;
- data.data = rd->readx.out.data;
p = pipe_state_find(private, fnum);
if (!p) {
return NT_STATUS_INVALID_HANDLE;
}
- status = dcesrv_output_blob(p->dce_conn, &data);
- if (NT_STATUS_IS_ERR(status)) {
- return status;
+ data.length = rd->readx.in.maxcnt;
+ data.data = rd->readx.out.data;
+ if (data.length > UINT16_MAX) {
+ data.length = 0;
}
+ if (data.length != 0) {
+ status = dcesrv_output_blob(p->dce_conn, &data);
+ if (NT_STATUS_IS_ERR(status)) {
+ return status;
+ }
+ }
+
rd->readx.out.remaining = 0;
rd->readx.out.compaction_mode = 0;
rd->readx.out.nread = data.length;
More information about the samba-cvs
mailing list