summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-02-05 01:30:02 +0000
committerAndrew Tridgell <tridge@samba.org>2002-02-05 01:30:02 +0000
commit5d2302899a78382dfbdf08ced2cca252cd1f4d63 (patch)
tree38dd7ecbd67b0737764687cc135f6269b53d5aec
parent7998c99191b2a02a6d2df7a2b5d2e4dfdbc8c8cb (diff)
downloadsamba-5d2302899a78382dfbdf08ced2cca252cd1f4d63.tar.gz
samba-5d2302899a78382dfbdf08ced2cca252cd1f4d63.tar.bz2
samba-5d2302899a78382dfbdf08ced2cca252cd1f4d63.zip
fixed a bug in qpathinfo client code
(This used to be commit 22f348a1f9501cc00d46d6c6064f71198558c0ee)
-rw-r--r--source3/libsmb/clirap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index 42f1f652eb..1cbadb4344 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -372,6 +372,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
{
int data_len = 0;
int param_len = 0;
+ int rparam_len, rdata_len;
uint16 setup = TRANSACT2_QPATHINFO;
pstring param;
char *rparam=NULL, *rdata=NULL;
@@ -397,9 +398,10 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
NULL, data_len, cli->max_xmit /* data, length, max */
) &&
cli_receive_trans(cli, SMBtrans2,
- &rparam, &param_len,
- &rdata, &data_len));
- if (!ret && cli_is_dos_error(cli)) {
+ &rparam, &rparam_len,
+ &rdata, &rdata_len));
+ if (!cli_is_dos_error(cli)) break;
+ if (!ret) {
/* we need to work around a Win95 bug - sometimes
it gives ERRSRV/ERRerror temprarily */
uint8 eclass;
@@ -410,7 +412,7 @@ BOOL cli_qpathinfo(struct cli_state *cli, const char *fname,
}
} while (count-- && ret==False);
- if (!ret || !rdata || data_len < 22) {
+ if (!ret || !rdata || rdata_len < 22) {
return False;
}