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

mongoc_cluster_fetch_stream_single should fail gracefully when passed invalid server_id

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None

      mongoc_cluster_fetch_stream_single calls BSON_ASSERT if it is passed a server_id that is either not present or is marked "retired" in the topology scanner. However, it is possible for a user to call this method with an arbitrary server_id via mongoc_cluster_stream_for_server. Calling BSON_ASSERT should be reserved for logical invariants in the code; since this condition can be triggered by user input, we should fail gracefully rather than crash.

            Assignee:
            kevin.albertson@mongodb.com Kevin Albertson
            Reporter:
            samantha.ritter@mongodb.com Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: