Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mathis Rosenhauer
libaec
Commits
14889476
Commit
14889476
authored
Sep 06, 2018
by
Mathis Rosenhauer
Browse files
First decode fuzzer data, then encode
parent
8d8311ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
fuzzing/fuzz_target.cc
View file @
14889476
...
@@ -29,14 +29,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
...
@@ -29,14 +29,14 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
strm
.
avail_in
=
Size
-
2
;
strm
.
avail_in
=
Size
-
2
;
strm
.
next_out
=
dest
.
data
();
strm
.
next_out
=
dest
.
data
();
strm
.
avail_out
=
dest
.
size
();
strm
.
avail_out
=
dest
.
size
();
aec_buffer_e
n
code
(
&
strm
);
aec_buffer_
d
ecode
(
&
strm
);
// Encode data
// Encode data
strm
.
next_in
=
reinterpret_cast
<
const
unsigned
char
*>
(
Data
)
+
2
;
strm
.
next_in
=
reinterpret_cast
<
const
unsigned
char
*>
(
Data
)
+
2
;
strm
.
avail_in
=
Size
-
2
;
strm
.
avail_in
=
Size
-
2
;
strm
.
next_out
=
dest
.
data
();
strm
.
next_out
=
dest
.
data
();
strm
.
avail_out
=
dest
.
size
();
strm
.
avail_out
=
dest
.
size
();
aec_buffer_
d
ecode
(
&
strm
);
aec_buffer_e
n
code
(
&
strm
);
return
0
;
return
0
;
}
}
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