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

Silent failure parsing hostnames longer than HOST_NAME_MAX

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.0
    • Affects Version/s: 1.3.3
    • Component/s: libmongoc
    • None
    • Environment:
      Linux / Ubuntu

      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.

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

              Created:
              Updated:
              Resolved: