summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-24 19:04:56 +0000
committerJeremy Allison <jra@samba.org>2001-01-24 19:04:56 +0000
commit918c3ebe32aacee82fe354d5b9b7ea4d477dcfda (patch)
treeb862ac7ffad8c8f91aa5180e59108681b2c9691b /source3/smbd/nttrans.c
parente31bf053633440bc3ceceb9208bb857fe94237a0 (diff)
downloadsamba-918c3ebe32aacee82fe354d5b9b7ea4d477dcfda.tar.gz
samba-918c3ebe32aacee82fe354d5b9b7ea4d477dcfda.tar.bz2
samba-918c3ebe32aacee82fe354d5b9b7ea4d477dcfda.zip
smbd/lanman.c: Fix for calling qsort with 0 number.
smbd/nttrans.c: Realloc mem fixes based on those that went into trans2.c smbd/process.c: Move to a table based dispatch, based on a comment from Andrew about Antons work. Jeremy. (This used to be commit a958f7822e095367efb8749b6f1f2e110ffb8866)
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index c0ccea0add..3aaaa9aebb 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1024,10 +1024,12 @@ static int do_nt_transact_create_pipe( connection_struct *conn,
return ret;
/* Realloc the size of parameters and data we will return */
- params = *ppparams = Realloc(*ppparams, 69);
+ params = Realloc(*ppparams, 69);
if(params == NULL)
return(ERROR(ERRDOS,ERRnomem));
+ *ppparams = params;
+
memset((char *)params,'\0',69);
p = params;
@@ -1337,10 +1339,12 @@ static int call_nt_transact_create(connection_struct *conn,
restore_case_semantics(file_attributes);
/* Realloc the size of parameters and data we will return */
- params = *ppparams = Realloc(*ppparams, 69);
+ params = Realloc(*ppparams, 69);
if(params == NULL)
return(ERROR(ERRDOS,ERRnomem));
+ *ppparams = params;
+
memset((char *)params,'\0',69);
p = params;
@@ -1520,10 +1524,12 @@ static int call_nt_transact_query_security_desc(connection_struct *conn,
DEBUG(3,("call_nt_transact_query_security_desc: file = %s\n", fsp->fsp_name ));
- params = *ppparams = Realloc(*ppparams, 4);
+ params = Realloc(*ppparams, 4);
if(params == NULL)
return(ERROR(ERRDOS,ERRnomem));
+ *ppparams = params;
+
/*
* Get the permissions to return.
*/
@@ -1548,12 +1554,14 @@ static int call_nt_transact_query_security_desc(connection_struct *conn,
* Allocate the data we will point this at.
*/
- data = *ppdata = Realloc(*ppdata, sd_size);
+ data = Realloc(*ppdata, sd_size);
if(data == NULL) {
free_sec_desc(&psd);
return(ERROR(ERRDOS,ERRnomem));
}
+ *ppdata = data;
+
memset(data, '\0', sd_size);
/*