Browse Source

Merge "Fix possible AIOOB in DirCacheTree.contains()"

stable-4.1
Christian Halstrick 10 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
446fa0e480
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java

2
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java vendored

@ -399,7 +399,7 @@ public class DirCacheTree {
for (int eOff = 0; eOff < eLen && aOff < aLen; eOff++, aOff++)
if (e[eOff] != a[aOff])
return false;
if (aOff == aLen)
if (aOff >= aLen)
return false;
return a[aOff] == '/';
}

Loading…
Cancel
Save