aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-27 21:08:49 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-27 21:08:49 +0000
commit080f36540ec2d9745de707536eadd807dce53953 (patch)
treef5c89903e2ebfae30cdaf9961c6441382ef89213 /epan/dissectors/packet-smb.c
parent97982cc1b04f7074aa5eb7346561600bbc803c30 (diff)
Fix the disssector assertion reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3877 :
The rest of the code assumes that sip can be NULL, so don't assert when it's not. Also make fid_cmp() static since it's only used in this module. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34663 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-smb.c')
-rw-r--r--epan/dissectors/packet-smb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-smb.c b/epan/dissectors/packet-smb.c
index e88f1c0669..ff7c355ab4 100644
--- a/epan/dissectors/packet-smb.c
+++ b/epan/dissectors/packet-smb.c
@@ -887,12 +887,13 @@ static int dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, pr
offset += len; \
*bcp -= len;
-gboolean sid_display_hex = FALSE;
+gboolean sid_display_hex = FALSE;
gboolean sid_name_snooping = FALSE;
/* Compare funtion to maintain the GSL_fid_info ordered
Order criteria: packet where the fid was opened */
-gint fid_cmp(smb_fid_info_t *fida, smb_fid_info_t *fidb)
+static gint
+fid_cmp(smb_fid_info_t *fida, smb_fid_info_t *fidb)
{
return (fida->opened_in - fidb->opened_in);
}
@@ -8732,9 +8733,8 @@ dissect_nt_trans_setup_request(tvbuff_t *tvb, packet_info *pinfo, int offset, pr
si = (smb_info_t *)pinfo->private_data;
DISSECTOR_ASSERT(si);
sip = si->sip;
- DISSECTOR_ASSERT(sip);
- if (sip->extra_info_type == SMB_EI_NTI) {
- nti=sip->extra_info;
+ if (sip && sip->extra_info_type == SMB_EI_NTI) {
+ nti=sip->extra_info;
}
if(parent_tree){