[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

GODRIVER-188

Change-Id: I0f216705b087cebc55e0d4bc63514aa7aac2d52d
Branch: master
https://github.com/10gen/mongo-go-driver/commit/3b8e3a7b60763b5ce10398951254950a35b06579

Generated at Thu Feb 08 08:33:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.