Refactor mongoc-metadata get_os_* functions to not use strndup

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • TBD
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We follow a sort of ugly pattern in mongoc-metadata.c all of the get_os* functions (like _get_os_name or _get_os_arch) return a malloc'd string. A better pattern would be to have the caller pass in a buffer (and max size) and the function can just copy the string into that buffer.

            Assignee:
            [DO NOT USE] Backlog - C Driver Team
            Reporter:
            Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: