Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Mathis Rosenhauer
libaec
Commits
bf622010
Unverified
Commit
bf622010
authored
Aug 31, 2018
by
MathisRosenhauer
Committed by
GitHub
Aug 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from schwehr/fuzzer
Minor cleanup of fuzz_target.cc
parents
01785605
28df6818
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
fuzzing/fuzz_target.cc
fuzzing/fuzz_target.cc
+5
-7
No files found.
fuzzing/fuzz_target.cc
View file @
bf622010
#include <stdlib.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include "libaec.h"
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
Data
,
size_t
Size
)
{
struct
aec_stream
strm
;
int32_t
*
source
;
unsigned
char
*
dest
;
if
(
Size
<
2
)
return
0
;
dest
=
(
unsigned
char
*
)
malloc
(
Size
*
4
);
unsigned
char
*
dest
=
static_cast
<
unsigned
char
*>
(
malloc
(
Size
*
4
));
struct
aec_stream
strm
;
strm
.
bits_per_sample
=
(
Data
[
0
]
&
0x1f
)
|
1
;
strm
.
block_size
=
8
<<
(
Data
[
1
]
&
3
);
strm
.
rsi
=
2
;
...
...
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