]> source.dussan.org Git - jgit.git/commit
Fix infinite loop in IndexPack 49/1049/4
authorShawn O. Pearce <spearce@spearce.org>
Sat, 3 Jul 2010 01:21:55 +0000 (18:21 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 16 Jul 2010 17:12:04 +0000 (10:12 -0700)
commit0b46e70155e1a14edc77f32e030094fb499887cf
treeb9bdd42bbd0c833041f911f73dc64a3b7fc83670
parentb840ed0121dfee935d503208db96639b04f7110f
Fix infinite loop in IndexPack

A programming error using the Inflater API led to an infinite
loop within IndexPack, caused by the Inflater returning 0 from
the inflate() method, but it didn't want more input.  This happens
when it has reached the end of the stream, or has reached a spot
asking for an external dictionary.  Such a case is a failure for us,
and we should abort out.

Thanks to Alex for pointing out that we had 3 implementations of
the inflate rountine, which should be consolidated into one and
use a switch to determine where to load data from.

Bug: 317416
Change-Id: I34120482375b687ea36ed9154002d77047e94b1f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit/resources/org/eclipse/jgit/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/IndexPack.java