[CDRIVER-7] bson_append_long produces bogus data Created: 24/Jan/10 Updated: 19/Oct/16 Resolved: 25/Jan/10 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rui Lopes | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
bson_append_long promises to write an 64 bit number in the header (with the bson_append_estart call), but it writes an 32-bit value. This was introduced in http://github.com/mongodb/mongo-c-driver/commit/e6eb5ba2cf1d79f0b519834ec5df25c4cd2168c2 To fix, just replace bson_append32 with bson_append64. |
| Comments |
| Comment by Mathias Stearn [ 25/Jan/10 ] |
|
Thanks for finding this. I added a test for all types to make sure this doesn't happen again. |
| Comment by auto [ 25/Jan/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'redbeard0531@gmail.com'}Message: Fix bson_append_long |