diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index fd5155a554..4cb57c69d8 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -1207,6 +1207,25 @@ BOOL api_rpcTNP(pipes_struct *p, char *rpc_name, DEBUG(5,("api_rpcTNP: called %s successfully\n", rpc_name)); + /* Check for buffer underflow in rpc parsing */ + + if ((DEBUGLEVEL >= 10) && + (p->in_data.data.data_offset != p->in_data.data.buffer_size)) { + int data_len = p->in_data.data.buffer_size - + p->in_data.data.data_offset; + char *data; + + data = malloc(data_len); + + DEBUG(10, ("api_rpcTNP: rpc input buffer underflow (parse error?)\n")); + if (data) { + prs_uint8s(False, "", &p->in_data.data, 0, data, + data_len); + free(data); + } + + } + return True; } |