diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2016-06-11 14:23:59 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-12 13:32:21 +0000 |
commit | b88247865ef5d765431524861f42d40a4207c6e7 (patch) | |
tree | 51f82299a4b22cd7fa8bc08b780ee47c7cde9f4a /epan/dissectors/packet-mongo.c | |
parent | be1213332688ee9ee3375fd45161ab9c6e8274ca (diff) |
mongo: don't THROW() an exception from a dissector
just return the overall length even if the value is not in line with the
protocol specification
Change-Id: Ieeb5d1d265acb6de807a1175f07c7981db4b6c2b
Reviewed-on: https://code.wireshark.org/review/15833
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mongo.c')
-rw-r--r-- | epan/dissectors/packet-mongo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mongo.c b/epan/dissectors/packet-mongo.c index 2183f73950..51e7256326 100644 --- a/epan/dissectors/packet-mongo.c +++ b/epan/dissectors/packet-mongo.c @@ -263,17 +263,17 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre if (nest_level > BSON_MAX_NESTING) { expert_add_info_format(pinfo, ti, &ei_mongo_document_recursion_exceeded, "BSON document recursion exceeds %u", BSON_MAX_NESTING); - THROW(ReportedBoundsError); + return document_length; } if (document_length < 5) { expert_add_info_format(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too short: %u", document_length); - THROW(ReportedBoundsError); + return document_length; } if (document_length > BSON_MAX_DOC_SIZE) { expert_add_info_format(pinfo, ti, &ei_mongo_document_length_bad, "BSON document length too long: %u", document_length); - THROW(ReportedBoundsError); + return document_length; } if (document_length == 5) { |