summaryrefslogtreecommitdiff
path: root/source3/pipesrvsvc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/pipesrvsvc.c')
-rw-r--r--source3/pipesrvsvc.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source3/pipesrvsvc.c b/source3/pipesrvsvc.c
index 2c94bb2ebf..8f80cb1bd6 100644
--- a/source3/pipesrvsvc.c
+++ b/source3/pipesrvsvc.c
@@ -188,13 +188,24 @@ BOOL api_srvsvcTNP(int cnum,int uid, char *param,char *data,
char **rdata,char **rparam,
int *rdata_len,int *rparam_len)
{
- int pkttype = CVAL(data, 2);
- uint32 call_id = SVAL(data,12);
- uint16 opnum = SVAL(data,22);
-
extern pstring myname;
char *q;
+ int pkttype;
+ uint32 call_id;
+ uint16 opnum;
+
+ if (data == NULL)
+ {
+ DEBUG(2,("api_srvsvcTNP: NULL data parameter\n"));
+ return False;
+ }
+
+ /* really should decode these with a RPC_HDR structure */
+ pkttype = CVAL(data, 2);
+ call_id = SVAL(data,12);
+ opnum = SVAL(data,22);
+
if (pkttype == RPC_BIND) /* RPC BIND */
{
DEBUG(4,("srvsvc rpc bind %x\n",pkttype));