summaryrefslogtreecommitdiff
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
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);
/*