Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
unifuzz-validate
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
文周繁
unifuzz-validate
Commits
7f45a94d
Commit
7f45a94d
authored
Dec 11, 2025
by
凌振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete fuzz_target.cc
parent
f49f064f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
54 deletions
+0
-54
fuzz_target.cc
fuzz_target.cc
+0
-54
No files found.
fuzz_target.cc
deleted
100644 → 0
View file @
f49f064f
#include <stdint.h>
#include "guetzli/jpeg_data.h"
#include "guetzli/jpeg_data_reader.h"
#include "guetzli/processor.h"
extern
"C"
int
test_func
(
const
uint8_t
*
data
,
size_t
size
)
{
std
::
string
jpeg_data
(
reinterpret_cast
<
const
char
*>
(
data
),
size
);
// Ignore large images, to prevent timeouts.
guetzli
::
JPEGData
jpg_header
;
if
(
!
guetzli
::
ReadJpeg
(
data
,
size
,
guetzli
::
JPEG_READ_HEADER
,
&
jpg_header
))
{
return
0
;
}
static
constexpr
int
kMaxPixels
=
10000
;
if
(
static_cast
<
int64_t
>
(
jpg_header
.
width
)
*
jpg_header
.
height
>
kMaxPixels
)
{
return
0
;
}
// TODO(robryk): Use nondefault parameters.
guetzli
::
Params
params
;
std
::
string
jpeg_out
;
(
void
)
guetzli
::
Process
(
params
,
nullptr
,
jpeg_data
,
&
jpeg_out
);
// TODO(robryk): Verify output distance if Process() succeeded.
return
0
;
}
int
main
(
int
argc
,
char
*
argv
[]){
if
(
argc
==
1
){
printf
(
"%s
\n
"
,
"usage"
);
return
0
;
}
char
*
file_path
=
argv
[
1
];
FILE
*
fp
;
if
((
fp
=
fopen
(
file_path
,
"rb"
))
==
NULL
){
printf
(
"cannot open file:%s
\n
"
,
file_path
);
return
0
;
}
fseek
(
fp
,
0
,
SEEK_END
);
size_t
file_len
=
ftell
(
fp
);
uint8_t
*
tmp
=
(
uint8_t
*
)
malloc
(
sizeof
(
uint8_t
)
*
file_len
);
fseek
(
fp
,
0
,
SEEK_SET
);
fread
(
tmp
,
file_len
,
sizeof
(
uint8_t
),
fp
);
fclose
(
fp
);
test_func
(
tmp
,
file_len
);
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