[CSHARP-1289] Fix 32 bit integer overflows in ByteBufferStream and MultiChunkBuffer Created: 21/May/15 Updated: 20/Jan/16 Resolved: 25/Jun/15 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.0 |
| Fix Version/s: | 2.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The current implementations of ByteBufferStream and MultiChunkBuffer use 32 bit integers for certain fields, which limits them to a maximum size of 2GB (minus 1). At this point we're not going to change the 2GB limit, but there are certain cases where the current implementation uses 32 bit arithmetic which can result in integer overflow and large values being mis-interpreted as negative numbers, causing odd results. |
| Comments |
| Comment by Githook User [ 25/Jun/15 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |