From 74603440ec8774167c45107d156efe10ac19a0f8 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Thu, 26 Mar 2009 11:28:37 -0700 Subject: [PATCH] s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name (cherry picked from commit e452955c077a761cbadd27bede8d6844edbb2e5e) --- source/libsmb/unexpected.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/libsmb/unexpected.c b/source/libsmb/unexpected.c index df4d2119e27..4404b26ccb0 100644 --- a/source/libsmb/unexpected.c +++ b/source/libsmb/unexpected.c @@ -163,6 +163,10 @@ static int traverse_match(TDB_CONTEXT *ttdb, TDB_DATA kbuf, TDB_DATA dbuf, ip, port); + if (!p) { + return 0; + } + if ((state->match_type == NMB_PACKET && p->packet.nmb.header.name_trn_id == state->match_id) || (state->match_type == DGRAM_PACKET && -- 2.11.4.GIT