diff options
author | Gerald Combs <gerald@wireshark.org> | 2005-12-13 17:00:03 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2005-12-13 17:00:03 +0000 |
commit | fa312091cec16d2042eb3f14bc6cc17f54f126c4 (patch) | |
tree | 0c49768c7a4d5a65dba318f230465d7719d2b0bc /epan/dissectors/packet-ncp2222.inc | |
parent | 4ca1ee0a89b1c67b5331d59919c197de6fcea409 (diff) |
Throw an exception if we have an invalid offset. Fixes bug 585.
svn path=/trunk/; revision=16780
Diffstat (limited to 'epan/dissectors/packet-ncp2222.inc')
-rw-r--r-- | epan/dissectors/packet-ncp2222.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index b7e460dc9d..a142ab76fb 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -1280,6 +1280,9 @@ process_struct_sub_ptvc_record(ptvcursor_t *ptvc, const ptvc_record *rec, /* Re-set the tree */ if (rec->sub_ptvc_rec->descr) { + if (ptvcursor_current_offset(ptvc) <= offset) + THROW(ReportedBoundsError); + proto_item_set_len(item, ptvcursor_current_offset(ptvc) - offset); ptvcursor_set_tree(ptvc, old_tree); } |