aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-28 00:00:36 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-09-28 00:00:36 +0000
commit8b7b1ff28ed3664c42dc7ade08bc3d9c9a5927de (patch)
tree717f8ee3c5ba2053421d0d9aed5f2751de2fd3cb /gtk
parentfb1dff45b59ec15ab52f1723c5529c15ff816cf3 (diff)
Update to SMB service response time stats.
For short packets, we might not have enough of the payload to decode the transaction info levels and thus that data structure is NULL. check the pointer to this struct first before we try to dereference it. svn path=/trunk/; revision=8558
Diffstat (limited to 'gtk')
-rw-r--r--gtk/smb_stat.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c
index 6b0dfd9ac8..e539c1926c 100644
--- a/gtk/smb_stat.c
+++ b/gtk/smb_stat.c
@@ -1,7 +1,7 @@
/* smb_stat.c
* smb_stat 2003 Ronnie Sahlberg
*
- * $Id: smb_stat.c,v 1.20 2003/09/26 02:09:44 guy Exp $
+ * $Id: smb_stat.c,v 1.21 2003/09/28 00:00:36 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -101,11 +101,15 @@ smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, void *psi
if(si->cmd==0xA0){
smb_nt_transact_info_t *sti=(smb_nt_transact_info_t *)si->sip->extra_info;
- add_srt_table_data(&ss->nt_trans_srt_table, sti->subcmd, &si->sip->req_time, pinfo);
+ if(sti){
+ add_srt_table_data(&ss->nt_trans_srt_table, sti->subcmd, &si->sip->req_time, pinfo);
+ }
} else if(si->cmd==0x32){
smb_transact2_info_t *st2i=(smb_transact2_info_t *)si->sip->extra_info;
- add_srt_table_data(&ss->trans2_srt_table, st2i->subcmd, &si->sip->req_time, pinfo);
+ if(st2i){
+ add_srt_table_data(&ss->trans2_srt_table, st2i->subcmd, &si->sip->req_time, pinfo);
+ }
}
return 1;