Silent failure parsing hostnames longer than HOST_NAME_MAX

XMLWordPrintableJSON

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

      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.

        1. tst_mongouri.cpp
          1 kB
          David Feurle

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              David Feurle
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: