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

Refactor mongoc-metadata get_os_* functions to not use strndup

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • TBD
    • Affects Version/s: None
    • Component/s: 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:
            backlog-c-driver [DO NOT USE] Backlog - C Driver Team
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: