jgit/org.eclipse.jgit
David Pursehouse f4fc6404ba BasePackConnection: Check for expected length of ref advertisement
When a server sends a ref advertisement using protocol v2 it contains
lines other than ref names and sha1s.  Attempting to get the sha1 out
of such a line using the substring method can result in a SIOOB error
when it doesn't actually contain the sha1 and ref name.

Add a check that the line is of the expected length, and subsequently
that the extracted object id is valid, and if not throw an exception.

Change-Id: Id92fe66ff8b6deb2cf987d81929f8d0602c399f4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2018-12-20 11:41:02 +09:00
..
.settings Update API warning filter to 5.1.3 2018-10-07 09:46:05 +02:00
META-INF Prepare 5.1.4-SNAPSHOT builds 2018-10-20 10:39:16 +02:00
findBugs [findBugs] Silence warning about Transport initialization 2012-09-14 00:01:47 +02:00
resources/org/eclipse/jgit BasePackConnection: Check for expected length of ref advertisement 2018-12-20 11:41:02 +09:00
src/org/eclipse/jgit BasePackConnection: Check for expected length of ref advertisement 2018-12-20 11:41:02 +09:00
.classpath Change JGit minimum execution environment to JavaSE-1.8 2016-09-20 11:32:36 +02:00
.fbprefs
.gitignore
.project
BUILD Bazel: Support building with Java 9 2018-02-07 17:51:35 -05:00
about.html SHA-1: collision detection support 2017-02-28 16:38:43 -08:00
build.properties Add "resources/" as a source folder 2010-06-05 14:39:27 +02:00
plugin.properties
pom.xml Prepare 5.1.4-SNAPSHOT builds 2018-10-20 10:39:16 +02:00