[CDRIVER-3464] Use safer alternative to strncpy when available (not just on MSVC) Created: 13/Dec/19  Updated: 28/Oct/23  Resolved: 17/Dec/19

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

Type: Improvement Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: teserakt-audit
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

bson_strncpy uses the safer strncpy_s if compiling on Windows, and strncpy otherwise. We should use strncpy_s wherever it is available.



 Comments   
Comment by Githook User [ 17/Dec/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3464 use strlcpy if available
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/2e2f0f95405342b5b40b1aa19055ac5d148bef02

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