Merge remote-tracking branch 'origin/topic/jsiwek/gh-435-rpc-crash'

* origin/topic/jsiwek/gh-435-rpc-crash:
  GH-435: fix null pointer deref in RPC analyzer
This commit is contained in:
Johanna Amann 2019-06-24 15:25:08 -07:00
commit 54613ad2b8
3 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,8 @@
2.6-519 | 2019-06-24 15:25:08 -0700
* GH-435: fix null pointer deref in RPC analyzer. (Jon Siwek, Corelight)
2.6-517 | 2019-06-24 15:20:39 -0700
* Add paraglob, a fairly quick data structure for matching a string against a large list of patterns.

View file

@ -1 +1 @@
2.6-517
2.6-519

View file

@ -286,7 +286,7 @@ int RPC_Interpreter::DeliverRPC(const u_char* buf, int n, int rpclen,
else
Weird("bad_RPC");
if ( n > 0 )
if ( n > 0 && buf )
{
// If it's just padded with zeroes, don't complain.
for ( ; n > 0; --n, ++buf )
@ -317,7 +317,7 @@ void RPC_Interpreter::Timeout()
if ( c->IsValidCall() )
{
const u_char* buf;
const u_char* buf = nullptr;
int n = 0;
if ( ! RPC_BuildReply(c, BifEnum::RPC_TIMEOUT, buf, n, network_time, network_time, 0) )