diff options
author | Jason Rassi <rassi@10gen.com> | 2013-01-24 12:47:40 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2013-01-24 13:21:48 -0500 |
commit | 6cf5e6d6318f0f9f932f02337e33b8a7e0b5c76b (patch) | |
tree | a3db2eeacbafa7fbe62747e46fbcfb6901a67869 /src/mongo/db/client.h | |
parent | e599e186e2482dc2a1caf86f40e80ebb7b3de5f6 (diff) | |
download | mongo-6cf5e6d6318f0f9f932f02337e33b8a7e0b5c76b.tar.gz |
SERVER-8130 Fix invalid access in textSearchEnabled check
Bug introduced in fts_index.cpp, FTSIndexPlugin::adjustIndexSpec()
(not changed by diff):
69| StringData desc = cc().desc();
Previously, Client::desc() returned std::string, so desc._data
became a dangling pointer to destroyed temporary cc().desc().
Resolved by changing return type of Client::desc() to StringData.
Diffstat (limited to 'src/mongo/db/client.h')
-rw-r--r-- | src/mongo/db/client.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h index 1649a22d20d..67063ddb147 100644 --- a/src/mongo/db/client.h +++ b/src/mongo/db/client.h @@ -84,7 +84,7 @@ namespace mongo { Context* getContext() const { return _context; } Database* database() const { return _context ? _context->db() : 0; } const char *ns() const { return _context->ns(); } - const std::string desc() const { return _desc; } + const StringData desc() const { return _desc; } void setLastOp( OpTime op ) { _lastOp = op; } OpTime getLastOp() const { return _lastOp; } |