diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-10-17 03:20:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-19 15:05:16 +0000 |
commit | 082f1a153bf5245081279e0d1d57048066c493e7 (patch) | |
tree | dbe5dbc446a2705901aa5b41894d9fd85c9ea59f /src/mongo/bson/bsonelement.cpp | |
parent | 38e0a213e7f38006656ecce9c782ad318ac537ca (diff) | |
download | mongo-082f1a153bf5245081279e0d1d57048066c493e7.tar.gz |
SERVER-51719 BSONElement::toString must handle len < 0CLOUDP-69887
Diffstat (limited to 'src/mongo/bson/bsonelement.cpp')
-rw-r--r-- | src/mongo/bson/bsonelement.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/bson/bsonelement.cpp b/src/mongo/bson/bsonelement.cpp index 1191f82ecf2..312eb849caf 100644 --- a/src/mongo/bson/bsonelement.cpp +++ b/src/mongo/bson/bsonelement.cpp @@ -873,7 +873,7 @@ void BSONElement::toString( if (!full && len > 80) { s << hexblob::encode(data, 70) << "...)"; } else { - s << hexblob::encode(data, len) << ")"; + s << hexblob::encode(data, std::max(len, 0)) << ")"; } } break; |