[CDRIVER-4166] Permit NULL as valid platform for mongoc_handshake_data_append Created: 20/Sep/21 Updated: 28/Oct/23 Resolved: 29/Sep/21 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.19.1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Kevin Albertson | Assignee: | Ezra Chung |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Background & Motivation The C++ driver assumes it is OK to pass NULL as the platform string in mongoc_handshake_append_data: https://github.com/mongodb/mongo-cxx-driver/blob/fd84da871c35cbc4beee0b39afa188b84c698fc1/src/mongocxx/instance.cpp#L93. That agrees with the documentation of mongoc_handshake_data_append. It notes all three arguments are optional. However, libmongoc currently does not check for NULL in this case: https://github.com/mongodb/mongo-c-driver/blob/25496ec9c57fcd538103bb13ae7b98ec464cfb53/src/libmongoc/src/mongoc/mongoc-handshake.c#L636-L641 Scope
|
| Comments |
| Comment by Githook User [ 05/Oct/21 ] |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message: |
| Comment by Githook User [ 29/Sep/21 ] |
|
Author: {'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}Message: |