summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.h
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2013-01-24 12:47:40 -0500
committerJason Rassi <rassi@10gen.com>2013-01-24 13:21:48 -0500
commit6cf5e6d6318f0f9f932f02337e33b8a7e0b5c76b (patch)
treea3db2eeacbafa7fbe62747e46fbcfb6901a67869 /src/mongo/db/client.h
parente599e186e2482dc2a1caf86f40e80ebb7b3de5f6 (diff)
downloadmongo-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.h2
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; }