diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-07-16 21:37:07 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2007-07-16 21:37:07 +0000 |
commit | 520296ca0240c9b06dfef01d9042c0d8d4205f1e (patch) | |
tree | e4b834402f7ec139ce322808ff17428dbafc14a3 | |
parent | 4285f239f02ac986a2e1d592492e798d1055a283 (diff) | |
download | wireshark-520296ca0240c9b06dfef01d9042c0d8d4205f1e.tar.gz |
Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1675 (warning: cast from pointer to integer of different size) and, presumably, display of PER encoded IPv4 addresses by copying the IP address into a guint32 and passing that to proto_tree_add_ipv4().
svn path=/trunk/; revision=22328
-rw-r--r-- | epan/dissectors/packet-per.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 6ea3f10210..2066a26e1a 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -1838,7 +1838,11 @@ DEBUG_ENTRY("dissect_per_octet_string"); } else if (hfi->type==FT_BYTES) { actx->created_item = proto_tree_add_bytes(tree, hf_index, tvb, val_start, val_length, pbytes); } else if (hfi->type==FT_IPv4) { - actx->created_item = proto_tree_add_ipv4(tree, hf_index, tvb, val_start, val_length, (guint32)pbytes); + guint32 ipa; + + /* Not sure if pbytes is aligned enough to reference it as a guint32 */ + memcpy(&ipa, pbytes, 4); + actx->created_item = proto_tree_add_ipv4(tree, hf_index, tvb, val_start, val_length, ipa); } else if (hfi->type==FT_IPv6) { actx->created_item = proto_tree_add_ipv6(tree, hf_index, tvb, val_start, val_length, pbytes); } else { |