[GODRIVER-188] Return error if the any lengths are negative Created: 05/Jan/18 Updated: 12/Feb/18 Resolved: 12/Feb/18 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.0.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kristofer Brandow (Inactive) | Assignee: | Kristofer Brandow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | GODRIVER New BSON |
| Description |
|
Since lengths in BSON are int32's we could have invalid BSON where this value is negative. The code should catch this whenever we read an int32 and return an error if the value is negative instead of potentially panicking or causing some error further down the call chain. |
| Comments |
| Comment by Githook User [ 12/Feb/18 ] |
|
Author: {'email': 'kris@mongodb.com', 'name': 'Kris Brandow', 'username': 'skriptble'}Message: Add negative length checking for Reader Change-Id: I0f216705b087cebc55e0d4bc63514aa7aac2d52d |