Rizin
unix-like reverse engineering framework and cli tools
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
b
d
e
h
i
k
n
p
r
s
w
Properties
Events
Related Functions
Files
File List
File Members
All
$
.
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
.
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Events
Friends
Macros
Modules
Pages
fuzz_main.c
Go to the documentation of this file.
1
#include "
zip_read_fuzzer.cc
"
2
#include <stdio.h>
3
#include <stdlib.h>
4
5
/* fuzz target entry point, works without libFuzzer */
6
7
int
8
main
(
int
argc,
char
**
argv
) {
9
FILE
*
f
;
10
char
*
buf
=
NULL
;
11
long
siz_buf;
12
13
if
(argc < 2) {
14
fprintf(stderr,
"no input file\n"
);
15
goto
err
;
16
}
17
18
f
= fopen(
argv
[1],
"rb"
);
19
if
(
f
==
NULL
) {
20
fprintf(stderr,
"error opening input file %s\n"
,
argv
[1]);
21
goto
err
;
22
}
23
24
fseek(
f
, 0,
SEEK_END
);
25
26
siz_buf = ftell(
f
);
27
rewind(
f
);
28
29
if
(siz_buf < 1) {
30
goto
err
;
31
}
32
33
buf
= (
char
*)
malloc
(siz_buf);
34
if
(
buf
==
NULL
) {
35
fprintf(stderr,
"malloc() failed\n"
);
36
goto
err
;
37
}
38
39
if
(fread(
buf
, siz_buf, 1,
f
) != 1) {
40
fprintf(stderr,
"fread() failed\n"
);
41
goto
err
;
42
}
43
44
(void)
LLVMFuzzerTestOneInput
((
uint8_t
*)
buf
, siz_buf);
45
46
err
:
47
free
(
buf
);
48
49
return
0;
50
}
err
static bool err
Definition:
armass.c:435
NULL
#define NULL
Definition:
cris-opc.c:27
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
Definition:
fuzz_disasm.c:221
main
int main(int argc, char **argv)
Definition:
fuzz_main.c:8
free
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition:
ht_inc.c:130
buf
voidpf void * buf
Definition:
ioapi.h:138
malloc
void * malloc(size_t size)
Definition:
malloc.c:123
argv
static static fork const void static count static fd const char const char static newpath char char argv
Definition:
sflib.h:40
benchmark.FILE
string FILE
Definition:
benchmark.py:21
uint8_t
unsigned char uint8_t
Definition:
sftypes.h:31
f
#define f(i)
Definition:
sha256.c:46
SEEK_END
#define SEEK_END
Definition:
zip.c:84
zip_read_fuzzer.cc
subprojects
libzip-1.9.2
regress
fuzz_main.c
Generated by
1.9.1