aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-08-09 14:38:11 +0000
committerGerald Combs <gerald@wireshark.org>2005-08-09 14:38:11 +0000
commit42137a03317ded37821b908886d9fc55dad5ffc5 (patch)
treee5d911c12bb761808d7233cbc5a24e7a29caf776 /plugins
parent0632baee212319360a01568ac8e8613cdfdc6b16 (diff)
Make sure we initialize our iap_conv struct _before_ we go digging
into a tvbuff. This keeps us from leaving junk data behind if we throw an exception. svn path=/trunk/; revision=15267
Diffstat (limited to 'plugins')
-rw-r--r--plugins/irda/packet-irda.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index bf30492fbb..e58d818498 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -592,15 +592,15 @@ static void dissect_iap_request(tvbuff_t* tvb, packet_info* pinfo, proto_tree* r
char attr_name[256];
+ iap_conv->pnext = NULL;
+ iap_conv->iap_query_frame = pinfo->fd->num;
+ iap_conv->pattr_dissector = NULL;
+
tvb_memcpy(tvb, class_name, offset + 1 + 1, clen);
class_name[clen] = 0;
tvb_memcpy(tvb, attr_name, offset + 1 + 1 + clen + 1, alen);
attr_name[alen] = 0;
- iap_conv->pnext = NULL;
- iap_conv->iap_query_frame = pinfo->fd->num;
- iap_conv->pattr_dissector = NULL;
-
/* Find the attribute dissector */
for (i = 0; class_dissector[i].class_name != NULL; i++)
if (strcmp(class_name, class_dissector[i].class_name) == 0)