Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce2015-01-27 05:49:02 +0000
committerGerrit Code Review @ Eclipse.org2015-01-27 05:49:02 +0000
commit9a2c5068450fd34477872f4a8c9876619da3d8b4 (patch)
tree3b749e2195da9ad1c807263eec1968a2fa7617f0
parentd612468c5c25057d1137832e6d3bad4432dae82c (diff)
parent3d17be85bac795d7da3caa15b5b09adb46052584 (diff)
downloadjgit-9a2c5068450fd34477872f4a8c9876619da3d8b4.tar.gz
jgit-9a2c5068450fd34477872f4a8c9876619da3d8b4.tar.xz
jgit-9a2c5068450fd34477872f4a8c9876619da3d8b4.zip
Merge "Handle invalid tree extensions"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
index 5acde4385e..30932e8274 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -425,7 +425,7 @@ public class DirCacheTree {
*/
void validate(final DirCacheEntry[] cache, final int cCnt, int cIdx,
final int pathOff) {
- if (entrySpan >= 0) {
+ if (entrySpan >= 0 && cIdx + entrySpan <= cCnt) {
// If we are valid, our children are also valid.
// We have no need to validate them.
//

Back to the top