Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
489aec44
Commit
489aec44
authored
Nov 11, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuzzers: declare standalone functions
parent
0429894e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
29 additions
and
2 deletions
+29
-2
fuzzers/commit_graph_fuzzer.c
+2
-0
fuzzers/config_file_fuzzer.c
+2
-0
fuzzers/download_refs_fuzzer.c
+2
-0
fuzzers/midx_fuzzer.c
+2
-0
fuzzers/objects_fuzzer.c
+2
-0
fuzzers/packfile_fuzzer.c
+2
-0
fuzzers/patch_parse_fuzzer.c
+2
-0
fuzzers/standalone_driver.c
+1
-2
fuzzers/standalone_driver.h
+14
-0
No files found.
fuzzers/commit_graph_fuzzer.c
View file @
489aec44
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
#include "hash.h"
#include "hash.h"
#include "commit_graph.h"
#include "commit_graph.h"
#include "standalone_driver.h"
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
{
{
GIT_UNUSED
(
argc
);
GIT_UNUSED
(
argc
);
...
...
fuzzers/config_file_fuzzer.c
View file @
489aec44
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include "git2.h"
#include "git2.h"
#include "config_backend.h"
#include "config_backend.h"
#include "standalone_driver.h"
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x)
int
foreach_cb
(
const
git_config_entry
*
entry
,
void
*
payload
)
int
foreach_cb
(
const
git_config_entry
*
entry
,
void
*
payload
)
...
...
fuzzers/download_refs_fuzzer.c
View file @
489aec44
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include "git2/sys/transport.h"
#include "git2/sys/transport.h"
#include "futils.h"
#include "futils.h"
#include "standalone_driver.h"
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x)
struct
fuzzer_buffer
{
struct
fuzzer_buffer
{
...
...
fuzzers/midx_fuzzer.c
View file @
489aec44
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#include "hash.h"
#include "hash.h"
#include "midx.h"
#include "midx.h"
#include "standalone_driver.h"
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
{
{
GIT_UNUSED
(
argc
);
GIT_UNUSED
(
argc
);
...
...
fuzzers/objects_fuzzer.c
View file @
489aec44
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include "git2.h"
#include "git2.h"
#include "object.h"
#include "object.h"
#include "standalone_driver.h"
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
...
...
fuzzers/packfile_fuzzer.c
View file @
489aec44
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#include "common.h"
#include "common.h"
#include "str.h"
#include "str.h"
#include "standalone_driver.h"
static
git_odb
*
odb
=
NULL
;
static
git_odb
*
odb
=
NULL
;
static
git_odb_backend
*
mempack
=
NULL
;
static
git_odb_backend
*
mempack
=
NULL
;
...
...
fuzzers/patch_parse_fuzzer.c
View file @
489aec44
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
#include "patch.h"
#include "patch.h"
#include "patch_parse.h"
#include "patch_parse.h"
#include "standalone_driver.h"
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
)
...
...
fuzzers/standalone_driver.c
View file @
489aec44
...
@@ -11,8 +11,7 @@
...
@@ -11,8 +11,7 @@
#include "futils.h"
#include "futils.h"
#include "path.h"
#include "path.h"
extern
int
LLVMFuzzerTestOneInput
(
const
unsigned
char
*
data
,
size_t
size
);
#include "standalone_driver.h"
extern
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
);
static
int
run_one_file
(
const
char
*
filename
)
static
int
run_one_file
(
const
char
*
filename
)
{
{
...
...
fuzzers/standalone_driver.h
0 → 100644
View file @
489aec44
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
#ifndef INCLUDE_standalone_driver_h__
#define INCLUDE_standalone_driver_h__
extern
int
LLVMFuzzerTestOneInput
(
const
unsigned
char
*
data
,
size_t
size
);
extern
int
LLVMFuzzerInitialize
(
int
*
argc
,
char
***
argv
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment