diff options
author | Gerald Combs <gerald@wireshark.org> | 2005-04-27 20:25:37 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2005-04-27 20:25:37 +0000 |
commit | e5af03f331b57aa7ac1433627f31da1172b11ce5 (patch) | |
tree | 19d348d03ad521844c0330cd651317302d6297d7 /plugins | |
parent | 22e13e11976b2cabcdbaf13f059fb63e292ba9d9 (diff) |
Fix a buffer overflow. Fixes bug 96.
svn path=/trunk/; revision=14207
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/megaco/packet-megaco.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/megaco/packet-megaco.c b/plugins/megaco/packet-megaco.c index 7e0d608755..1a48c1e12e 100644 --- a/plugins/megaco/packet-megaco.c +++ b/plugins/megaco/packet-megaco.c @@ -889,6 +889,10 @@ nextcontext: switch ( tempchar ){ case 'E': + if (tokenlen+1 > (int) sizeof(TermID)) { + proto_tree_add_text(megaco_tree, tvb, 0, 0, "[ Parse error: Invalid TermID length (%d) ]", tokenlen+1); + return; + } tvb_get_nstringz0(tvb,tvb_offset,tokenlen+1,TermID); TermID[0] = 'e'; my_proto_tree_add_string(megaco_tree_command_line, hf_megaco_termid, tvb, |