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>
This commit is contained in:
parent
be12133326
commit
b88247865e
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue