aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-k12.c
diff options
context:
space:
mode:
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>2007-06-12 23:53:58 +0000
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>2007-06-12 23:53:58 +0000
commit5627dfe7036ea951270e17c0bba159239ee9b1b2 (patch)
tree5df4ed2bbf1875fc21925365463adc0831a66c6f /epan/dissectors/packet-k12.c
parent6545f4ed73cf19371b54018f5193b36a7166e99e (diff)
This should fix Coverity's CID: 240 (Bug 1648)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22084 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-k12.c')
-rw-r--r--epan/dissectors/packet-k12.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index b94e1dca4e..7da9093c54 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -182,7 +182,7 @@ static void dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree) {
dissector_handle_t sub_handle = NULL;
dissector_handle_t* handles;
guint i;
-
+
k12_item = proto_tree_add_protocol_format(tree, proto_k12, tvb, 0, 0, "Packet from: '%s' (0x%.8x)",
pinfo->pseudo_header->k12.input_name,
pinfo->pseudo_header->k12.input);
@@ -256,6 +256,9 @@ static void dissect_k12(tvbuff_t* tvb,packet_info* pinfo,proto_tree* tree) {
item = proto_tree_add_text(stack_tree,tvb,0,0,
"Info: You can edit the 'K12 Protocols' table from Preferences->Protocols->k12xx");
PROTO_ITEM_SET_GENERATED(item);
+
+ call_dissector(data_handle, tvb, pinfo, tree);
+ return;
}
/* Setup subdissector information */
@@ -304,7 +307,7 @@ static void k12_update_cb(void* r, const char** err) {
if (h->handles) g_free(h->handles);
- h->handles = g_malloc(sizeof(dissector_handle_t)*num_protos);
+ h->handles = g_malloc0(sizeof(dissector_handle_t)*(num_protos < 2 ? 2 : num_protos));
for (i = 0; i < num_protos; i++) {
if ( ! (h->handles[i] = find_dissector(protos[i])) ) {