diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-12-26 15:28:28 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-12-26 15:28:28 +0000 |
commit | 07c92db36b340288d7ce3ea4a3b81019fe21220c (patch) | |
tree | cc8209963660333e4ddb6c68d4d2e97ae070823f | |
parent | 8106e33188bf9c5b1b126fc3b15ff3e83bd36f3f (diff) |
From Michal Labedzki: To ensure that names are correct copy NULL too This fixes unknown characters sometimes show in src/dst columns, etc. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639
svn path=/trunk/; revision=46789
-rw-r--r-- | epan/dissectors/packet-bthci_acl.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index 8e5a845acb..80bda75759 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -193,23 +193,23 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_snprintf(remote_addr_name, remote_length, "%s (%s)", remote_ether_addr, remote_name); if (pinfo->p2p_dir == P2P_DIR_RECV) { - SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, (int) strlen(remote_name), remote_name); + SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, (int)strlen(remote_name) + 1, remote_name); SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, remote_bdaddr->bd_addr); - SET_ADDRESS(&pinfo->src, AT_STRINGZ, (int) strlen(remote_addr_name), remote_addr_name); + SET_ADDRESS(&pinfo->src, AT_STRINGZ, (int)strlen(remote_addr_name) + 1, remote_addr_name); } else if (pinfo->p2p_dir == P2P_DIR_SENT) { - SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, (int) strlen(remote_name), remote_name); + SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, (int)strlen(remote_name) + 1, remote_name); SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, remote_bdaddr->bd_addr); - SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int) strlen(remote_addr_name), remote_addr_name); + SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(remote_addr_name) + 1, remote_addr_name); } } else { if (pinfo->p2p_dir == P2P_DIR_RECV) { - SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, 0, ""); - SET_ADDRESS(&pinfo->dl_src, AT_STRINGZ, 0, ""); - SET_ADDRESS(&pinfo->src, AT_STRINGZ, 0, ""); + SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, 1, ""); + SET_ADDRESS(&pinfo->dl_src, AT_STRINGZ, 1, ""); + SET_ADDRESS(&pinfo->src, AT_STRINGZ, 10, "remote ()"); } else if (pinfo->p2p_dir == P2P_DIR_SENT) { - SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, 0, ""); - SET_ADDRESS(&pinfo->dl_dst, AT_STRINGZ, 0, ""); - SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 0, ""); + SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, 1, ""); + SET_ADDRESS(&pinfo->dl_dst, AT_STRINGZ, 1, ""); + SET_ADDRESS(&pinfo->dst, AT_STRINGZ, 10, "remote ()"); } } @@ -244,13 +244,13 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_snprintf(localhost_addr_name, localhost_length, "%s (%s)", localhost_ether_addr, localhost_name); if (pinfo->p2p_dir == P2P_DIR_RECV) { - SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, (int) strlen(localhost_name), localhost_name); + SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, (int)strlen(localhost_name) + 1, localhost_name); SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, localhost_bdaddr); - SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int) strlen(localhost_addr_name), localhost_addr_name); + SET_ADDRESS(&pinfo->dst, AT_STRINGZ, (int)strlen(localhost_addr_name) + 1, localhost_addr_name); } else if (pinfo->p2p_dir == P2P_DIR_SENT) { - SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, (int) strlen(localhost_name), localhost_name); + SET_ADDRESS(&pinfo->net_src, AT_STRINGZ, (int)strlen(localhost_name) + 1, localhost_name); SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, localhost_bdaddr); - SET_ADDRESS(&pinfo->src, AT_STRINGZ, (int) strlen(localhost_addr_name), localhost_addr_name); + SET_ADDRESS(&pinfo->src, AT_STRINGZ, (int)strlen(localhost_addr_name) + 1, localhost_addr_name); } /* find the chandle_data structure associated with this chandle */ |