Re: [PATCH v6 2/3] commit-graph: fix buffer read-overflow

2019-02-20 Thread SZEDER Gábor
On Wed, Feb 20, 2019 at 03:55:58PM +0100, Ævar Arnfjörð Bjarmason wrote: > > @@ -376,11 +377,15 @@ corrupt_graph_and_verify() { > > data="${2:-\0}" > > grepstr=$3 > > cd "$TRASH_DIRECTORY/full" && > > + orig_size=$(wc -c < $objdir/info/commit-graph) && > > + zero_pos=${4:-${orig_siz

Re: [PATCH v6 2/3] commit-graph: fix buffer read-overflow

2019-02-20 Thread Ævar Arnfjörð Bjarmason
On Tue, Jan 15 2019, Josh Steadmon wrote: > fuzz-commit-graph identified a case where Git will read past the end of > a buffer containing a commit graph if the graph's header has an > incorrect chunk count. A simple bounds check in parse_commit_graph() > prevents this. This has a 2.21 regressio

[PATCH v6 2/3] commit-graph: fix buffer read-overflow

2019-01-15 Thread Josh Steadmon
fuzz-commit-graph identified a case where Git will read past the end of a buffer containing a commit graph if the graph's header has an incorrect chunk count. A simple bounds check in parse_commit_graph() prevents this. Signed-off-by: Josh Steadmon --- commit-graph.c | 14 --