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/db/cst | |
parent | 38e0a213e7f38006656ecce9c782ad318ac537ca (diff) | |
download | mongo-082f1a153bf5245081279e0d1d57048066c493e7.tar.gz |
SERVER-51719 BSONElement::toString must handle len < 0CLOUDP-69887
Diffstat (limited to 'src/mongo/db/cst')
-rw-r--r-- | src/mongo/db/cst/c_node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/cst/c_node.cpp b/src/mongo/db/cst/c_node.cpp index 0c6db03f835..17a89a532fd 100644 --- a/src/mongo/db/cst/c_node.cpp +++ b/src/mongo/db/cst/c_node.cpp @@ -120,7 +120,7 @@ auto printValue(const T& payload) { [](const UserString& userString) { return "<UserString "s + userString + ">"; }, [](const UserBinary& userBinary) { return "<UserBinary "s + typeName(userBinary.type) + ", " + - hexblob::encode(userBinary.data, userBinary.length) + ">"; + hexblob::encode(userBinary.data, std::max(userBinary.length, 0)) + ">"; }, [](const UserUndefined& userUndefined) { return "<UserUndefined>"s; }, [](const UserObjectId& userObjectId) { |