mongo: fix document depth tracking

Fixes a "BSON document recursion exceeds" error on lists of > 100
documents.
This commit is contained in:
Kevin Albertson 2022-11-08 20:17:17 -05:00 committed by Gerald Combs
parent ae0c38a07a
commit 2b43f5f650
1 changed files with 4 additions and 0 deletions

View File

@ -469,6 +469,10 @@ dissect_bson_document(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
} /* end switch() */
} while (offset < final_offset-1);
// Restore depth.
nest_level--;
p_set_proto_depth(pinfo, proto_mongo, nest_level);
return document_length;
}