aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-noe.c
diff options
context:
space:
mode:
authorerikdejong <erikdejong@gmail.com>2017-03-19 19:19:11 +0100
committerMichael Mann <mmann78@netscape.net>2017-03-19 20:40:56 +0000
commit9a81d2ec3764f33a2525c66d784e24f00a852916 (patch)
tree5897e5c8a29266fbb51660330da950138dca57c5 /epan/dissectors/packet-noe.c
parent0fdbaa4f1855594e7a48bc3b1ff9e31e835cb860 (diff)
Fix: UA3G read past end of tvb + NOE key descriptions
packet-ua3g.c: Start tone device routing packet causes exception because it adds a subtree with length 6 where it should be 3. Changed 6 to 3. packet-noe.c: Key description is incomplete because buffer reserved is only 10 bytes long and key descriptions are up to 23 bytes long. Changed buffer length to 24. Bug: 13502 Change-Id: I8212d23c650efd341e87f766a80a887ef82f4b0b Reviewed-on: https://code.wireshark.org/review/20633 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-noe.c')
-rw-r--r--epan/dissectors/packet-noe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-noe.c b/epan/dissectors/packet-noe.c
index b3bfb25f34..09d338d720 100644
--- a/epan/dissectors/packet-noe.c
+++ b/epan/dissectors/packet-noe.c
@@ -856,7 +856,7 @@ static char *decode_key_name(int unicode)
{
char *key_name;
- key_name = (char *)wmem_alloc(wmem_packet_scope(), 10);
+ key_name = (char *)wmem_alloc(wmem_packet_scope(), 24);
if ((unicode <= 0x20)
|| (unicode == 0x7F)
@@ -866,15 +866,15 @@ static char *decode_key_name(int unicode)
|| (unicode == 0xE9)
|| (unicode == 0xF9))
{
- g_snprintf(key_name, 10, "%s", val_to_str_ext_const(unicode, &str_key_name_ext, "Unknown"));
+ g_snprintf(key_name, 24, "%s", val_to_str_ext_const(unicode, &str_key_name_ext, "Unknown"));
}
else if (unicode <= 0xFF)
{
- g_snprintf(key_name, 10, "%c", unicode);
+ g_snprintf(key_name, 24, "%c", unicode);
}
else
{
- g_snprintf(key_name, 10, "%s", val_to_str_ext_const(unicode, &str_key_name_ext, "Unknown"));
+ g_snprintf(key_name, 24, "%s", val_to_str_ext_const(unicode, &str_key_name_ext, "Unknown"));
}
return key_name;
}