Don't store an AT_STRINGZ address in ep_ allocated memory: that memory is
freed before the addresses may be used.  Use se_ memory instead (no, that's
not really ideal either).

It would appear that several other dissectors have the same problem.

svn path=/trunk/; revision=46320
This commit is contained in:
Jeff Morriss 2012-12-02 02:46:12 +00:00
parent e2c9d02ba8
commit a92bbbcd5c
1 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
remote_ether_addr = get_ether_name(remote_bdaddr->bd_addr);
remote_length = (gint)(strlen(remote_ether_addr) + 3 + strlen(remote_name) + 1);
remote_addr_name = ep_alloc(remote_length);
remote_addr_name = se_alloc(remote_length);
g_snprintf(remote_addr_name, remote_length, "%s (%s)", remote_ether_addr, remote_name);
@ -238,7 +238,7 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
localhost_name = "";
localhost_length = (gint)(strlen(localhost_ether_addr) + 3 + strlen(localhost_name) + 1);
localhost_addr_name = ep_alloc(localhost_length);
localhost_addr_name = se_alloc(localhost_length);
g_snprintf(localhost_addr_name, localhost_length, "%s (%s)", localhost_ether_addr, localhost_name);