diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2012-03-28 10:12:20 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2012-03-28 10:36:51 -0400 |
commit | 6c0d300a54f14fcfbd05dab5756097986b20eca8 (patch) | |
tree | 0aa120fda99a07d54ed50285f75ee1fc016d8657 /org.eclipse.jgit.iplog/about.html | |
parent | 55bf06b43d8e8ed2f15357e4ecf26eefbff31e29 (diff) | |
download | jgit-6c0d300a54f14fcfbd05dab5756097986b20eca8.tar.gz jgit-6c0d300a54f14fcfbd05dab5756097986b20eca8.zip |
Fix loading packed objects >2G
Parsing the size from a packed object header was incorrectly computing
the total inflated length when the length exceeded the range of a Java
int. The next 7 bits of size information was shifted left as an int
using a shift of 25 bits, placing the higher bits of the size into the
sign position. When this size was extended to a long to be added to
the current size accumulator the size went negative, resulting in
NegativeArraySizeException being thrown.
Fix all places where this particular pattern of code is used to read a
pack size field, or a binary delta header, as they both use the same
variable length encoding scheme.
Change-Id: I04008728ed828f18202652c3d5401cf95a441d0a
Diffstat (limited to 'org.eclipse.jgit.iplog/about.html')
0 files changed, 0 insertions, 0 deletions