mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
- don't generate 0 params in torture
- handle 0 params in ipc.c
This commit is contained in:
parent
91597c12fb
commit
c0dc8e87f0
@ -3348,7 +3348,7 @@ struct
|
||||
static int api_reply(connection_struct *conn,uint16 vuid,char *outbuf,char *data,char *params,
|
||||
int tdscnt,int tpscnt,int mdrcnt,int mprcnt)
|
||||
{
|
||||
int api_command = SVAL(params,0);
|
||||
int api_command;
|
||||
struct mem_buf rdata_buf;
|
||||
struct mem_buf rparam_buf;
|
||||
char *rdata = NULL;
|
||||
@ -3358,8 +3358,14 @@ static int api_reply(connection_struct *conn,uint16 vuid,char *outbuf,char *data
|
||||
BOOL reply=False;
|
||||
int i;
|
||||
|
||||
SMB_ASSERT(params != 0);
|
||||
|
||||
api_command = SVAL(params,0);
|
||||
|
||||
DEBUG(3,("Got API command %d of form <%s> <%s> (tdscnt=%d,tpscnt=%d,mdrcnt=%d,mprcnt=%d)\n",
|
||||
api_command,params+2,skip_string(params+2,1),
|
||||
api_command,
|
||||
params+2,
|
||||
skip_string(params+2,1),
|
||||
tdscnt,tpscnt,mdrcnt,mprcnt));
|
||||
|
||||
for (i=0;api_commands[i].name;i++)
|
||||
@ -3448,7 +3454,6 @@ static int named_pipe(connection_struct *conn,uint16 vuid, char *outbuf,char *na
|
||||
int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int bufsize)
|
||||
{
|
||||
fstring name;
|
||||
|
||||
char *data=NULL,*params=NULL;
|
||||
uint16 *setup=NULL;
|
||||
int outsize = 0;
|
||||
@ -3560,7 +3565,8 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, int size, int
|
||||
|
||||
if (strncmp(name,"\\PIPE\\",strlen("\\PIPE\\")) == 0) {
|
||||
DEBUG(5,("calling named_pipe\n"));
|
||||
outsize = named_pipe(conn,vuid,outbuf,name+strlen("\\PIPE\\"),setup,data,params,
|
||||
outsize = named_pipe(conn,vuid,outbuf,
|
||||
name+strlen("\\PIPE\\"),setup,data,params,
|
||||
suwcnt,tdscnt,tpscnt,msrcnt,mdrcnt,mprcnt);
|
||||
} else {
|
||||
DEBUG(3,("invalid pipe name\n"));
|
||||
|
@ -623,7 +623,7 @@ static void run_randomipc(void)
|
||||
|
||||
for (i=0;i<1000;i++) {
|
||||
api = sys_random() % 500;
|
||||
param_len = sys_random() % 64;
|
||||
param_len = (sys_random() % 64) + 4;
|
||||
|
||||
rand_buf(param, param_len);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user