aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
authorlroland <lroland@f5534014-38df-0310-8fa8-9805f1628bb7>2006-03-07 13:48:54 +0000
committerlroland <lroland@f5534014-38df-0310-8fa8-9805f1628bb7>2006-03-07 13:48:54 +0000
commit87a4348f4cb5d0a90673148ccb6dc650bc5e59f8 (patch)
treea34632d55aa30b4b621f51599cdebd0b4f478ffb /epan/packet.c
parent9c143464b8480b20bff66d6db4c51169a736107b (diff)
Fix a possible NULL pointer dereference discovered by coverity.
I'm not sure, if it is possible to get a NULL pointer here, but it is safer to fix it. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17494 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 587f58c4e2..52821597d2 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1510,17 +1510,17 @@ dissector_try_heuristic(heur_dissector_list_t sub_dissectors,
if (dtbl_entry->protocol != NULL) {
pinfo->current_proto =
proto_get_protocol_short_name(dtbl_entry->protocol);
- }
- /*
- * Add the protocol name to the layers; we'll remove it
- * if the dissector fails.
- */
- if (pinfo->layer_names) {
- if (pinfo->layer_names->len > 0)
- g_string_append(pinfo->layer_names, ":");
- g_string_append(pinfo->layer_names,
- proto_get_protocol_filter_name(proto_get_id(dtbl_entry->protocol)));
+ /*
+ * Add the protocol name to the layers; we'll remove it
+ * if the dissector fails.
+ */
+ if (pinfo->layer_names) {
+ if (pinfo->layer_names->len > 0)
+ g_string_append(pinfo->layer_names, ":");
+ g_string_append(pinfo->layer_names,
+ proto_get_protocol_filter_name(proto_get_id(dtbl_entry->protocol)));
+ }
}
if ((*dtbl_entry->dissector)(tvb, pinfo, tree)) {