[JAVA-2548] GridFSDownloadStreamImpl.skip() can't handle >2GB Created: 07/Jul/17 Updated: 29/Oct/23 Resolved: 11/Jul/17 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 3.4.2 |
| Fix Version/s: | 3.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Rustam Abdullaev | Assignee: | Ross Lawley |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Description |
|
After calling GridFSDownloadStreamImpl.skip() with a value larger than 2GB, e.g. 2306734080, the subsequent read() fails with ArrayIndexOutOfBoundsException. It seems like this casting is missing some parentheses at line 117:
This is in effect:
But should have been:
The same applies here at line 126:
(Why float by the way, and not double?) |
| Comments |
| Comment by Githook User [ 10/Jul/17 ] | |
|
Author: {u'username': u'rozza', u'name': u'Ross Lawley', u'email': u'ross.lawley@gmail.com'}Message: Fix casting in GridFSDownloadImpl
| |
| Comment by Ross Lawley [ 10/Jul/17 ] | |
| Comment by Ross Lawley [ 10/Jul/17 ] | |
|
Thanks for the ticket rustyx and identifying the cause. I've scheduled a fix for the 3.5 release. | |
| Comment by Rustam Abdullaev [ 07/Jul/17 ] | |
|
I mean it should have been
|