[CDRIVER-4255] Add assertions for non-null client and pool parameters Created: 29/Dec/21  Updated: 28/Oct/23  Resolved: 14/Jun/23

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.24.0

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Josh Siegel (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-3723 Validate URI options on client/client... Closed
Problem/Incident
causes CDRIVER-4665 Client assertions in opts validation ... Closed

 Description   

After CDRIVER-3723, client and pool constructors will return NULL in more situations (e.g. invalid topology). In applications that were not already checking for NULL return values, this could lead to unexpected segfaults. We should consider adding assertions to functions that take client and pool parameters to mitigate this risk.



 Comments   
Comment by Githook User [ 13/Jun/23 ]

Author:

{'name': 'Joshua Siegel', 'email': '39130209+joshbsiegel@users.noreply.github.com', 'username': 'joshbsiegel'}

Message: CDRIVER-4255 add asserts for functions with client and pool parameters (#1302)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ce7468863b9a9ef13d155f0d6f1517adf011aa66

Generated at Wed Feb 07 21:20:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.