The following issues were found

src/mongo/db/exec/sbe/sbe_mkobj_test.cpp
1 issues
syntax error
Error

Line: 266

                  }
};

TEST_F(MkObjStageTest, MakeObjKeep) {
    testKeep<MakeObjStage>();
}

TEST_F(MkObjStageTest, MakeBsonObjKeep) {
    testKeep<MakeBsonObjStage>();

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/sbe_numeric_convert_test.cpp
1 issues
syntax error
Error

Line: 89

                  }
};

TEST_F(SBENumericTest, Int32ToInt64) {
    assertConversion(int32_t{-2147483648},
                     int64_t{-2147483648},
                     value::TypeTags::NumberInt32,
                     value::TypeTags::NumberInt64);
    assertConversion(

            

Reported by Cppcheck.

src/mongo/db/exec/sbe/sbe_sorted_merge_test.cpp
1 issues
syntax error
Error

Line: 113

                  }
};

TEST_F(SortedMergeStageTest, TwoChildrenBasicAscending) {
    auto [resultAccessors, sortedMerge] =
        makeSortedMerge({BSON_ARRAY(BSON_ARRAY(1 << 1) << BSON_ARRAY(3 << 3)),
                         BSON_ARRAY(BSON_ARRAY(2 << 2) << BSON_ARRAY(4 << 4))},
                        std::vector<value::SortDirection>{value::SortDirection::Ascending});


            

Reported by Cppcheck.

src/mongo/db/exec/sbe/stages/branch.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 61 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/bson_scan.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 60 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/check_bounds.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 79 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/co_scan.cpp
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 48 Column: 19 CWE codes: 362

                  return ctx.getAccessor(slot);
}

void CoScanStage::open(bool reOpen) {
    auto optTimer(getOptTimer(_opCtx));

    _commonStats.opens++;
}


            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/co_scan.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 51 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/hash_agg.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 81 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/hash_join.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 75 Column: 10 CWE codes: 362

              
    void prepare(CompileCtx& ctx) final;
    value::SlotAccessor* getAccessor(CompileCtx& ctx, value::SlotId slot) final;
    void open(bool reOpen) final;
    PlanState getNext() final;
    void close() final;

    std::unique_ptr<PlanStageStats> getStats(bool includeDebugInfo) const final;
    const SpecificStats* getSpecificStats() const final;

            

Reported by FlawFinder.