diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-03-16 22:01:27 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-03-16 22:01:27 +0000 |
commit | 0b60f086ef02b92cda04cc8e279f7213e7716d7b (patch) | |
tree | 30959fdc5934d928e700644ea8fadca138d26713 /packet-smb.c | |
parent | 481b4bca97dcbd55c27ca12edc4ecf1442cb7d2e (diff) |
There is no guarantee that, when processing an SMB response, "si->sip"
is non-null, as there's no guarantee that the corresponding SMB request
is in the capture. Check whether it's null before using it.
svn path=/trunk/; revision=4954
Diffstat (limited to 'packet-smb.c')
-rw-r--r-- | packet-smb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-smb.c b/packet-smb.c index dab94f85f4..3d77e30890 100644 --- a/packet-smb.c +++ b/packet-smb.c @@ -3,7 +3,7 @@ * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com> * 2001 Rewrite by Ronnie Sahlberg and Guy Harris * - * $Id: packet-smb.c,v 1.220 2002/03/16 04:39:29 sahlberg Exp $ + * $Id: packet-smb.c,v 1.221 2002/03/16 22:01:27 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -4890,14 +4890,16 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* another way to transport DCERPC over SMB is to skip Transaction completely and just read write */ if(bc){ - if(si->sip->flags&SMB_SIF_TID_IS_IPC){ + if(si->sip != NULL && si->sip->flags&SMB_SIF_TID_IS_IPC){ tvbuff_t *dcerpc_tvb; /* dcerpc call */ dcerpc_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), bc); dissect_pipe_dcerpc(dcerpc_tvb, pinfo, top_tree, tree, fid); } else { - /* ordinary file data */ + /* ordinary file data, or we didn't see the request, + so we don't know whether this is a DCERPC call + or not */ offset = dissect_file_data(tvb, pinfo, tree, offset, bc, datalen); } bc = 0; |