aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-07-31 08:36:46 +0200
committerMichael Mann <mmann78@netscape.net>2017-07-31 11:16:58 +0000
commitc9cb01adbb24c91b665c6c219573f8ee96e1986c (patch)
tree19b5a17548517181e0886453557d833f8c1d5b82 /plugins
parent4af5e1a5c3fef04bd6e8131cbfad6617238d5f91 (diff)
IrCOMM: check string length before appending it to item
Bug: 13929 Change-Id: I33f3fec77014949fcc15df72c42ffcb25158562f Reviewed-on: https://code.wireshark.org/review/22887 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> 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-ircomm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/irda/packet-ircomm.c b/plugins/irda/packet-ircomm.c
index df5d017..e3a8b16 100644
--- a/plugins/irda/packet-ircomm.c
+++ b/plugins/irda/packet-ircomm.c
@@ -275,7 +275,10 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
g_strlcat(buf, ")", 256);
- proto_item_append_text(ti, "%s", buf+2);
+ if (strlen(buf) > 2)
+ proto_item_append_text(ti, "%s", buf+2);
+ else
+ proto_item_append_text(ti, "unknown)");
break;
@@ -290,7 +293,10 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, guint offset, packet_in
g_strlcat(buf, ")", 256);
- proto_item_append_text(ti, "%s", buf+2);
+ if (strlen(buf) > 2)
+ proto_item_append_text(ti, "%s", buf+2);
+ else
+ proto_item_append_text(ti, "unknown)");
break;