Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1129

Silent failure parsing hostnames longer than HOST_NAME_MAX

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.0
    • 1.3.3
    • libmongoc
    • None
    • Linux / Ubuntu

    Description

      mongoc_uri_parse_hostname lowercases hostnames (CDRIVER-536) but doesn't NULL-terminate hostnames that exceed the platform's HOST_NAME_MAX. Original reporter used a platform where HOST_NAME_MAX is 64, on my Mac it's 255. Regardless, a longer hostname in the input results in an unterminated string in the mongoc_uri_t host list.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            david@firehome.de David Feurle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: