aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-07-08 22:46:52 -0400
committerMichael Mann <mmann78@netscape.net>2017-07-09 19:54:35 +0000
commitc2ebb62e7e2adca72b932276102ee0a293b9a4ff (patch)
treea793883e1b49caf742fafbbb57001d7b0bbac13f /plugins
parentffb8bbd37227f466d228f20ae30b87504d4e1760 (diff)
Don't use uint_to_str_back when you need guint32_to_str_buf.
It will end up eventually crashing column buffers because memory behind the address is trounced. Change-Id: Id6b5a42effc503e4b8bf5e1deb2135241e2893f3 Reviewed-on: https://code.wireshark.org/review/22563 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/irda/packet-irda.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/irda/packet-irda.c b/plugins/irda/packet-irda.c
index 52b2881..7fff285 100644
--- a/plugins/irda/packet-irda.c
+++ b/plugins/irda/packet-irda.c
@@ -1853,11 +1853,9 @@ static int dissect_irda(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root, voi
static int irda_addr_to_str(const address* addr, gchar *buf, int buf_len _U_)
{
const guint8 *addrdata = (const guint8 *)addr->data;
- gchar *start_buf = buf;
- buf = uint_to_str_back(buf, *addrdata);
- *buf = '\0';
- return (int)(buf-start_buf+1);
+ guint32_to_str_buf(*addrdata, buf, buf_len);
+ return (int)strlen(buf);
}
static int irda_addr_str_len(const address* addr _U_)