[CXX-729] Look into the use of string_view .data() Created: 04/Nov/15  Updated: 05/Nov/15  Resolved: 05/Nov/15

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

Type: Task Priority: Major - P3
Reporter: Matt Cotter Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates CXX-730 string_view.data() is unsafe Closed
Epic Link: C++11 Driver MongoDB 3.2

 Description   

.data() is not guaranteed to be null terminated, but is used in collection.cpp to send pointers to libmongoc. Perhaps c_str() is the right way to go?

For more, see comments here:
https://github.com/mongodb/mongo-cxx-driver/pull/367#discussion_r43909065


Generated at Wed Feb 07 22:00:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.