aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fddi.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-08 17:07:25 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-09 01:10:05 +0000
commitecaa1f8d21b1284a267ca08d4d698ca99fbcab83 (patch)
tree71fb9a61c7c8727f4c5dd4fd1a22f61fe64e928b /epan/dissectors/packet-fddi.c
parenta2abf8b37fa1bd6595af98ea3233e1306149e27c (diff)
convert variables that were static just because of SET_ADDRESS macro to use the proper pinfo->pool instead.
Change-Id: I914918d9629f654ead497dddac0f412b690e4409 Reviewed-on: https://code.wireshark.org/review/6430 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-fddi.c')
-rw-r--r--epan/dissectors/packet-fddi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-fddi.c b/epan/dissectors/packet-fddi.c
index 0ec6ffb303..279aec5649 100644
--- a/epan/dissectors/packet-fddi.c
+++ b/epan/dissectors/packet-fddi.c
@@ -315,7 +315,7 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *ti, *hidden_item;
const gchar *fc_str;
proto_tree *fc_tree;
- static guchar src[6], dst[6]; /* has to be static due to SET_ADDRESS */
+ guchar *src = (guchar*)wmem_alloc(pinfo->pool, 6), *dst = (guchar*)wmem_alloc(pinfo->pool, 6);
guchar src_swapped[6], dst_swapped[6];
tvbuff_t *next_tvb;
static fddi_hdr fddihdrs[4];
@@ -370,9 +370,9 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* XXX - copy them to some buffer associated with "pi", rather than
just making "dst" static? */
- SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, &dst[0]);
- SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, &dst[0]);
- SET_ADDRESS(&fddihdr->dst, AT_ETHER, 6, &dst[0]);
+ SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
+ SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
+ SET_ADDRESS(&fddihdr->dst, AT_ETHER, 6, dst);
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_dst, tvb, FDDI_P_DHOST + FDDI_PADDING, 6, dst);
@@ -395,9 +395,9 @@ dissect_fddi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* XXX - copy them to some buffer associated with "pi", rather than
just making "src" static? */
- SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, &src[0]);
- SET_ADDRESS(&pinfo->src, AT_ETHER, 6, &src[0]);
- SET_ADDRESS(&fddihdr->src, AT_ETHER, 6, &src[0]);
+ SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
+ SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
+ SET_ADDRESS(&fddihdr->src, AT_ETHER, 6, src);
if (fh_tree) {
proto_tree_add_ether(fh_tree, hf_fddi_src, tvb, FDDI_P_SHOST + FDDI_PADDING, 6, src);