]> source.dussan.org Git - jgit.git/commit
Fix possible arithmetic overflow when setting a timeout 92/62692/2
authorChristian Halstrick <christian.halstrick@sap.com>
Tue, 15 Dec 2015 08:24:07 +0000 (09:24 +0100)
committerChristian Halstrick <christian.halstrick@sap.com>
Tue, 15 Dec 2015 08:44:09 +0000 (09:44 +0100)
commit310e858f818405d6ad4b9758f22abebd26d0ea88
tree44d78ff9c7a87c2cb6033c74e9ec771fd195ff4c
parent95b36b397b528f858ef1559da3c33c6cf3d7117b
Fix possible arithmetic overflow when setting a timeout

BasePackPushConnection#readStringLongTimeout() was setting a timeout 10
times bigger than some other timeout or the pack transfer time. This
could lead to negative integer values when we hit an arithmetic
overflow. Add a check for this situation and set the timeout to
Integer.MAX_VALUE when overflow happens.

Bug: 484352
CC: Eugene Petrenko <eugene.petrenko@gmail.com>
Change-Id: Ie2a86312c1bcb1ec3e6388fa490ab3c845d41808
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java