s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
authorTim Prouty <tprouty@samba.org>
Wed, 25 Mar 2009 00:05:16 +0000 (17:05 -0700)
committerTim Prouty <tprouty@samba.org>
Wed, 25 Mar 2009 00:05:16 +0000 (17:05 -0700)
source3/libsmb/unexpected.c

index df4d2119e27fceefa14d9d860c720031e5307e6e..d123e24aa8ec6cabab9ed3083296e4073d23fffd 100644 (file)
@@ -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) ||