[GODRIVER-802] Document fields corrupted in transformAndEnsureID Created: 01/Feb/19 Updated: 28/Oct/23 Resolved: 08/Feb/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | CRUD |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Pavel Antonov | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
If document contains binary fields at the beginning of structure, data in fields will be overwritten with "_id" and corrupted. Code:
As result "bin" field will contains []byte("Identifier") instead of zeros. Cause of error, using same buffer (var buf) for document data values and _id encoding/decoding. Here: https://github.com/mongodb/mongo-go-driver/blob/42e68e39d0196d841aed31ec9e40e80edb4f1566/mongo/mongo.go#L120
|
| Comments |
| Comment by Githook User [ 08/Feb/19 ] |
|
Author: {'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}Message: Change-Id: I20957caedda200b1ffd8db3738d562798abbf6f9 |