summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clirap.c
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
commit22f348a1f9501cc00d46d6c6064f71198558c0ee (patch)
tree36937364399784bb37561e4642611e36a24a8260 /source/libsmb/clirap.c
parent6ff236249559f8a11381cab9cc1757b26764a39d (diff)
downloadsamba-22f348a1f9501cc00d46d6c6064f71198558c0ee.tar.gz
samba-22f348a1f9501cc00d46d6c6064f71198558c0ee.tar.xz
samba-22f348a1f9501cc00d46d6c6064f71198558c0ee.zip
fixed a bug in qpathinfo client code
Diffstat (limited to 'source/libsmb/clirap.c')
-rw-r--r--source/libsmb/clirap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/libsmb/clirap.c b/source/libsmb/clirap.c
index 42f1f652eb1..1cbadb43447 100644
--- a/source/libsmb/clirap.c
+++ b/source/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;
}