summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c1
-rw-r--r--source3/libsmb/clilist.c2
-rw-r--r--source3/libsmb/clitrans.c17
3 files changed, 11 insertions, 9 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index dffff5e6ab..982ac544cf 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -414,7 +414,6 @@ BOOL cli_negprot(struct cli_state *cli)
cli->protocol = prots[SVAL(cli->inbuf,smb_vwv0)].prot;
-
if (cli->protocol >= PROTOCOL_NT1) {
/* NT protocol */
cli->sec_mode = CVAL(cli->inbuf,smb_vwv1);
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index a7ba1c07ad..e727217628 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -216,7 +216,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
continue;
}
- if (cli_is_error(cli))
+ if (cli_is_error(cli) || !rdata || !rparam)
return -1;
if (total_received == -1) total_received = 0;
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 83912ddc6d..4822508e38 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -171,16 +171,19 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
* be treated as such.
*/
- if (cli_is_dos_error(cli)) {
- cli_dos_error(cli, &eclass, &ecode);
-
- if(cli->nt_pipe_fnum == 0)
- return(False);
+ if (cli_is_error(cli)) {
+ if (cli_is_dos_error(cli)) {
+ cli_dos_error(cli, &eclass, &ecode);
- if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
- if (eclass != 0 && (ecode != (0x80000000 | STATUS_BUFFER_OVERFLOW)))
+ if(cli->nt_pipe_fnum == 0)
return(False);
+
+ if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
+ if (eclass != 0 && (ecode != (0x80000000 | STATUS_BUFFER_OVERFLOW)))
+ return(False);
+ }
}
+ return False;
}
/* parse out the lengths */