summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-17 18:16:42 +0000
committerJeremy Allison <jra@samba.org>2001-08-17 18:16:42 +0000
commit556c8f3fbfd060ff865bb6854393018cc9e86828 (patch)
treed91465641c35df842f65765bc7a82b00fe051ec4 /source3/libsmb
parentccb927b17ca3194118b9dfc9a5a533b62a448ec7 (diff)
downloadsamba-556c8f3fbfd060ff865bb6854393018cc9e86828.tar.gz
samba-556c8f3fbfd060ff865bb6854393018cc9e86828.tar.bz2
samba-556c8f3fbfd060ff865bb6854393018cc9e86828.zip
Use tparam not tdata when reallocing params to make clearer.
Jeremy. (This used to be commit 31804cb7a89f280cec4c047cad643c7f593f9b03)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clitrans.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index c97ddfc331..83912ddc6d 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -148,6 +148,7 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
uint8 eclass;
uint32 ecode;
char *tdata;
+ char *tparam;
*data_len = *param_len = 0;
@@ -170,14 +171,13 @@ 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_is_dos_error(cli)) {
+ cli_dos_error(cli, &eclass, &ecode);
- if(cli->nt_pipe_fnum == 0)
+ if(cli->nt_pipe_fnum == 0)
return(False);
- if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
+ if(!(eclass == ERRDOS && ecode == ERRmoredata)) {
if (eclass != 0 && (ecode != (0x80000000 | STATUS_BUFFER_OVERFLOW)))
return(False);
}
@@ -199,13 +199,13 @@ BOOL cli_receive_trans(struct cli_state *cli,int trans,
}
if (total_param!=0) {
- tdata = Realloc(*param,total_param);
- if (!tdata && total_param!=0) {
+ tparam = Realloc(*param,total_param);
+ if (!tparam) {
DEBUG(0,("cli_receive_trans: failed to enlarge param buffer\n"));
return False;
}
else
- *param = tdata;
+ *param = tparam;
}
while (1) {
@@ -377,6 +377,7 @@ BOOL cli_receive_nt_trans(struct cli_state *cli,
uint8 eclass;
uint32 ecode;
char *tdata;
+ char *tparam;
*data_len = *param_len = 0;
@@ -413,13 +414,15 @@ BOOL cli_receive_nt_trans(struct cli_state *cli,
DEBUG(0,("cli_receive_nt_trans: failed to enlarge buffer"));
return False;
}
- else *data = tdata;
- tdata = Realloc(*param,total_param);
- if (!tdata) {
+ else
+ *data = tdata;
+ tparam = Realloc(*param,total_param);
+ if (!tparam) {
DEBUG(0,("cli_receive_nt_trans: failed to enlarge buffer"));
return False;
}
- else *param = tdata;
+ else
+ *param = tparam;
while (1) {
this_data = SVAL(cli->inbuf,smb_ntr_DataCount);