summaryrefslogtreecommitdiff
path: root/source/libsmb
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-02-23 21:25:59 +0000
committerLuke Leighton <lkcl@samba.org>2000-02-23 21:25:59 +0000
commit621ed75ec795bd416bbedb752dc26f87cb780066 (patch)
tree9656bb4348c93a97963d73ab7e7115df7f4a0ba2 /source/libsmb
parent713484eb878ab7851d248063ec4a04fb607522c7 (diff)
downloadsamba-621ed75ec795bd416bbedb752dc26f87cb780066.tar.gz
From Elrond@Wunder-Nett.org Thu Feb 24 08:11:57 2000
Date: Wed, 23 Feb 2000 19:28:08 +0100 From: Elrond <Elrond@Wunder-Nett.org> To: Luke Kenneth Casson Leighton <lkcl@samba.org> Subject: receiving multiple pdus Hi Luke, Someone ran rpcclients enumusers against a 2500 user domain yesterday... and it crashed... The code to receive multiple pdus is broken... I fixed most of the things, I could find out myself, but in rpc_client/cli_connect.c:rpc_api_rcv_pdu() in the MSRPC_LOCAL-case, I don't know, what you wanted there. (ret = ...; ret = ...;) What I did: - fixed receiving of multiple pdus (now you should be able to run rpcclient against your favorite 2500 user domain) - fixed some possible problem in become_guest (I realy should write something to samba-technical, this one is possibly interesting for HEAD/2.0 too) - fixed up some copyrights (I know, I modified those) Elrond [lkcl: the code that elrond fixed was to read a dce/rpc header of 0x18 bytes. i _thought_ i'd removed this code and replaced it with read-an-entire-pdu. it _is_ ok to do this, because the last pdu turns up short when using SMBs. you request 0x1630 bytes and you only get... say.... 0x40, 0x18 of which is the header and the rest is the last part of the last PDU]
Diffstat (limited to 'source/libsmb')
-rw-r--r--source/libsmb/clientgen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c
index 1dca33e14b1..5eda1bc356a 100644
--- a/source/libsmb/clientgen.c
+++ b/source/libsmb/clientgen.c
@@ -1579,6 +1579,12 @@ size_t cli_read_one(struct cli_state *cli, int fnum, char *buf, off_t offset, si
if (size == 0) return 0;
+ if (buf == NULL)
+ {
+ DEBUG(1, ("cli_read_one: NULL buf\n"));
+ return 0;
+ }
+
cli_issue_read(cli, fnum, offset, size, 0);
if (!cli_receive_smb(cli))