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

DB Name Error Checking prints SIZE_MAX instead of actual user-provided string size

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • 135

    Description

      From a BF investigation.

       

      Testing on a standalone from a day-old version of master, I see this:

      MongoDB Enterprise > db.adminCommand({renameCollection: 'Non-numeric data in input field which evaluates to an array should be ignored', to: 'test.b'})
      {
       "ok" : 0,
       "errmsg" : "db name must be at most 63 characters, found: 18446744073709551615",
       "code" : 73,
       "codeName" : "InvalidNamespace"
      }
       
       
       
      
      

      Looking at the two locations that would produce this I see:

          • There's some delicate error checking here, and std::string::npos (i.e. SIZE_MAX) gets printed.

      SERVER-75529 appears to have touched a lot of this size handling.

      Attachments

        Activity

          People

            matt.broadstone@mongodb.com Matt Broadstone
            matt.kneiser@mongodb.com Matt Kneiser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: