summaryrefslogtreecommitdiff
path: root/source3/libsmb/unexpected.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-03-24 17:05:16 -0700
committerTim Prouty <tprouty@samba.org>2009-03-24 17:05:16 -0700
commitdb5677d071fc58f38cab4ab800111455a8637edb (patch)
tree9680b0f5def63802828165c6b2dcea20333d57d2 /source3/libsmb/unexpected.c
parentc653e8daaf3e842544d7f9561557d1ab9449971c (diff)
downloadsamba-db5677d071fc58f38cab4ab800111455a8637edb.tar.gz
samba-db5677d071fc58f38cab4ab800111455a8637edb.tar.bz2
samba-db5677d071fc58f38cab4ab800111455a8637edb.zip
s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
Diffstat (limited to 'source3/libsmb/unexpected.c')
-rw-r--r--source3/libsmb/unexpected.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
index df4d2119e2..d123e24aa8 100644
--- a/source3/libsmb/unexpected.c
+++ b/source3/libsmb/unexpected.c
@@ -162,6 +162,8 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf,
state->match_type,
ip,
port);
+ if (!p)
+ return 0;
if ((state->match_type == NMB_PACKET &&
p->packet.nmb.header.name_trn_id == state->match_id) ||