]> git.ipfire.org Git - thirdparty/git.git/commit - Makefile
commit-graph, fuzz: add fuzzer for commit-graph
authorJosh Steadmon <steadmon@google.com>
Tue, 15 Jan 2019 22:25:50 +0000 (14:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Jan 2019 04:31:49 +0000 (20:31 -0800)
commitaa658574bfcbe03f5703458ac10be1ef3f5f5472
treeb8841623f51f1013b9207a53b199f3f0b557b56b
parent77556354bb7ac50450e3b28999e3576969869068
commit-graph, fuzz: add fuzzer for commit-graph

Break load_commit_graph_one() into a new function, parse_commit_graph().
The latter function operates on arbitrary buffers, which makes it
suitable as a fuzzing target. Since parse_commit_graph() is only called
by load_commit_graph_one() (and the fuzzer described below), we omit
error messages that would be duplicated by the caller.

Adds fuzz-commit-graph.c, which provides a fuzzing entry point
compatible with libFuzzer (and possibly other fuzzing engines).

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Makefile
commit-graph.c
commit-graph.h
fuzz-commit-graph.c [new file with mode: 0644]