diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-17 06:29:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-17 06:29:20 +0000 |
commit | fb1e26fe6a6d333572cd7d448c6a9c58fd81dbd0 (patch) | |
tree | f6dbae5975632b7bd27fb2dce6383b13a22cb2c2 /packet-smb-pipe.c | |
parent | 28d7063364ee6aa870ef916d781f7de6deadbd21 (diff) |
Use the "fragmented" field of the "packet_info" structure in
"dissect_frame()" to indicate whether a ReportedBoundsError was due to
the packet being malformed (i.e., the packet was shorter than it's
supposed to be, so the dissector went past the end trying to extract
fields that were supposed to be there) or due to it not being
reassembled (i.e., the packet was fragmented, and we didn't reassemble
it, but just treated the first fragment as the entire packet, so the
dissector went past the end trying to extract fields that were partially
or completely in fragments after that). Mark the latter as being
unreasembled rather than malformed.
Properly initialize, save, and restore that field, and properly set it,
so that works.
svn path=/trunk/; revision=4555
Diffstat (limited to 'packet-smb-pipe.c')
-rw-r--r-- | packet-smb-pipe.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packet-smb-pipe.c b/packet-smb-pipe.c index 26445ae704..450d464542 100644 --- a/packet-smb-pipe.c +++ b/packet-smb-pipe.c @@ -8,7 +8,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets * significant rewrite to tvbuffify the dissector, Ronnie Sahlberg and * Guy Harris 2001 * - * $Id: packet-smb-pipe.c,v 1.63 2002/01/15 10:01:20 guy Exp $ + * $Id: packet-smb-pipe.c,v 1.64 2002/01/17 06:29:16 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -2540,6 +2540,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree dcerpc_private_info dcerpc_priv; smb_info_t *smb_priv = (smb_info_t *)pinfo->private_data; gboolean result; + gboolean save_fragmented; dcerpc_priv.transport_type = DCERPC_TRANSPORT_SMB; dcerpc_priv.data.smb.fid = fid; @@ -2554,6 +2555,8 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree pinfo->can_desegment=2; } + save_fragmented = pinfo->fragmented; + /* see if this packet is already desegmented */ if(smb_dcerpc_reassembly && pinfo->fd->flags.visited){ fragment_data *fd_head; @@ -2616,6 +2619,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree if (!result) call_dissector(data_handle, d_tvb, pinfo, parent_tree); + pinfo->fragmented = save_fragmented; return TRUE; } |