Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-78676

Replace c-string constructor with fill constructor in CurrentOpExhaustCursorTestFixture::initTestCollection on v5.0

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.24, 5.0.20
    • None
    • None
    • Query Integration
    • Fully Compatible
    • ALL
    • v4.4
    • QI 2023-07-10, QI 2023-07-24, QI 2023-08-07
    • 51

    Description

      We're creating a std::string of a certain large size, but only initializing it with a string of size 1 here. From the std::string constructor docs, it looks like instead of std::string("A", size), we should use std::string(size, "A") to fill the string with the string "A" repeated.

      Note that this code doesn't exist on versions after 5.0, and so will only need to change on v5.0 and v4.4.
       

      Attachments

        Activity

          People

            davis.haupt@mongodb.com Davis Haupt (Inactive)
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: