[CDRIVER-2524] Potential leaks in JSON parser Created: 02/Mar/18  Updated: 28/Oct/23  Resolved: 07/Mar/18

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

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There are bson_init calls not paired with bson_destroy calls when parsing a few JSON types like DBPointer and code with scope. If the contents of these JSON objects exceed 120 bytes, the JSON parser will allocate a buffer that it does not free.



 Comments   
Comment by Githook User [ 07/Mar/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2524 leak in test
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3a1116ba2bc01bf76fa1688972fc40384432c535

Comment by Githook User [ 07/Mar/18 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: CDRIVER-2524 potential leaks in JSON parser
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b6b8ba6ab77bbd5dad4c50b94c353735676b0394

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