From 78422169b29d84bfebd8df705b00432d627d202d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Nov 2005 04:49:02 +0000 Subject: r11629: fixed a bug found with the socket:testnonblock code. With randomised under-reads we could end up supplying a buffer to the client that has an incorrect length (This used to be commit 9c95015b9cccc10a5ba1facd4b48c0fff34e9588) --- source4/lib/stream/packet.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/lib/stream/packet.c') diff --git a/source4/lib/stream/packet.c b/source4/lib/stream/packet.c index 7aed43a943..76b796d4b5 100644 --- a/source4/lib/stream/packet.c +++ b/source4/lib/stream/packet.c @@ -291,6 +291,7 @@ next_partial: /* it is a full request - give it to the caller */ blob = pc->partial; + blob.length = pc->num_read; if (pc->packet_size < pc->num_read) { pc->partial = data_blob_talloc(pc, blob.data + pc->packet_size, -- cgit