Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
Description
Pointer to a local stack variable returned or used outside scope
Defect 99681 (STATIC_C)
Checker RETURN_LOCAL (subcategory none)
File: /src/mongo/db/pipeline/aggregation_request.cpp
Function mongo::AggregationRequest::parseFromBSON(mongo::NamespaceString, const mongo::BSONObj &)
/src/mongo/db/pipeline/aggregation_request.cpp, line: 75
Temporary variable of type "mongo::StringData const [6]" goes out of scope.
const std::initializer_list<StringData> optionsParsedElseWhere = {
|
/src/mongo/db/pipeline/aggregation_request.cpp, line: 93
Using "optionsParsedElseWhere.begin()", which points to an out-of-scope temporary variable of type "mongo::StringData const [6]".
if (std::find(optionsParsedElseWhere.begin(), optionsParsedElseWhere.end(), fieldName) !=
|