[CDRIVER-143] Memory overrun caused by not allocating enough memory for bson iterators Created: 25/May/12  Updated: 19/Oct/16  Resolved: 01/Jun/12

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

Type: Bug Priority: Critical - P2
Reporter: Jose Sebastian Battig Assignee: Kyle Banker
Resolution: Done Votes: 0
Labels: bson
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Major Change

 Description   

The bson_iterator_create() was modified as follows in order to prevent the overrun:

MONGO_EXPORT bson_iterator* bson_iterator_create() {
/* JSB: In the following line I fixed sizeof(bson_iterator*) to sizeof(bson_iterator) */
return (bson_iterator*)malloc(sizeof(bson_iterator));
}



 Comments   
Comment by auto [ 01/Jun/12 ]

Author:

{u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}

Message: CDRIVER-143 fix for bson_iterator_create()
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d6f058c138a89e218a1656d70ec98ec73df541ee

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