From a9ea26531bf10fca7d0bc19f9f3bebc2585ab73e Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 27 Jul 2009 22:23:52 +0200 Subject: [PATCH 1/4] Fix NULL pointer dereference in wlanstat_packet(). --- gtk/wlan_stat_dlg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gtk/wlan_stat_dlg.c b/gtk/wlan_stat_dlg.c index 16f224d..6cfa5e0 100644 --- a/gtk/wlan_stat_dlg.c +++ b/gtk/wlan_stat_dlg.c @@ -393,7 +393,7 @@ wlanstat_packet (void *phs, packet_info *pinfo, epan_dissect_t *edt _U_, const v } } - if (!te->probe_req_searched && (si->type != 0x04) && (te->type[0x04] == 0) && + if (te && !te->probe_req_searched && (si->type != 0x04) && (te->type[0x04] == 0) && (si->stats.ssid_len > 1 || si->stats.ssid[0] != 0)) { /* * We have found a matching entry without Probe Requests. -- 1.6.3.3 From 20894dfdd74f50ac5bb25fdc7541f614c4824add Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 3 Aug 2009 18:39:17 +0200 Subject: [PATCH 2/4] Fix NULL pointer dereference in call_foreach_merge_settings(). --- tap-comparestat.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tap-comparestat.c b/tap-comparestat.c index fc4c8fc..2f0d9c8 100644 --- a/tap-comparestat.c +++ b/tap-comparestat.c @@ -324,6 +324,7 @@ call_foreach_merge_settings(gpointer value, gpointer arg) fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->start_packet_nr_first); if(fInfoTemp==NULL){ printf("ERROR: start number not set correctly\n"); + return FALSE; } if(fmod(fInfoTemp->zebra_time.nsecs, 2)){ /*first file*/ -- 1.6.3.3 From 651cfdf05d30ae02d199dd32d660087e91e43960 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 3 Aug 2009 18:48:32 +0200 Subject: [PATCH 3/4] Fix dead store warning in dissect_geographical_description(). --- epan/dissectors/packet-gsm_a_common.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c index 3d646ac..3e01100 100644 --- a/epan/dissectors/packet-gsm_a_common.c +++ b/epan/dissectors/packet-gsm_a_common.c @@ -471,7 +471,6 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr offset++; /* Confidence */ proto_tree_add_item(tree, hf_gsm_a_geo_loc_confidence, tvb, offset, 1, FALSE); - offset++; }else if(type_of_shape==ELLIPSOID_POINT_WITH_ALT){ /* Ellipsoid Point with Altitude */ /*D: Direction of Altitude */ -- 1.6.3.3 From aee0947076d080259ac092d1b7303ffc357d5db3 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 3 Aug 2009 18:58:53 +0200 Subject: [PATCH 4/4] Fix 'result of operation is undefined' warning in dissect_per_sequence(). It's not clear to me whether the warning is justified, but it shouldn't hurt. --- epan/dissectors/packet-per.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index aaba802..cc94b45 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -1839,7 +1839,7 @@ DEBUG_ENTRY("dissect_per_sequence"); for(i=0;sequence[i].p_id;i++){ if( (sequence[i].extension==ASN1_NO_EXTENSIONS) || (sequence[i].extension==ASN1_EXTENSION_ROOT) ){ - if(sequence[i].optional==ASN1_OPTIONAL){ + if((sequence[i].optional==ASN1_OPTIONAL) && (num_opts>0)){ gboolean is_present; is_present=(1<<(num_opts-1))&optional_mask; num_opts--; -- 1.6.3.3