diff options
author | zhaoliwei <zhaoliwei@xiaomi.com> | 2020-03-25 13:55:25 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-02 17:40:39 +0000 |
commit | b1edffdf299ebca77f3f8eeb621ed49ce0810917 (patch) | |
tree | bbcd043a7dd99c387802e0a2c34b7c4768ac58ab /src/mongo/client | |
parent | cf571d9224eff2b613756af87fb0e2974192138a (diff) | |
download | mongo-b1edffdf299ebca77f3f8eeb621ed49ce0810917.tar.gz |
SERVER-45063 fix the bug in mongo::uriDecode
Closes #1340
Signed-off-by: Henrik Edin <henrik.edin@mongodb.com>
Diffstat (limited to 'src/mongo/client')
-rw-r--r-- | src/mongo/client/mongo_uri.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/client/mongo_uri.cpp b/src/mongo/client/mongo_uri.cpp index 73c8ed8de76..de4f87ff2f5 100644 --- a/src/mongo/client/mongo_uri.cpp +++ b/src/mongo/client/mongo_uri.cpp @@ -89,7 +89,7 @@ mongo::StatusWith<std::string> mongo::uriDecode(StringData toDecode) { for (size_t i = 0; i < toDecode.size(); ++i) { const char c = toDecode[i]; if (c == '%') { - if (i + 2 > toDecode.size()) { + if (i + 2 >= toDecode.size()) { return Status(ErrorCodes::FailedToParse, "Encountered partial escape sequence at end of string"); } |