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
afba23ea
Commit
afba23ea
authored
Dec 11, 2025
by
凌振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传新文件
parent
7f45a94d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
target.cc
target.cc
+44
-0
No files found.
target.cc
0 → 100644
View file @
afba23ea
// Copyright 2016 Google Inc. All Rights Reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
#include <stdint.h>
#include <stdlib.h>
#include <string>
#include <stdio.h>
#include <cstdlib>
int
test_func
(
const
uint8_t
*
Data
,
size_t
Size
)
{
unsigned
char
*
buf
;
int
buflen
;
std
::
string
s
(
reinterpret_cast
<
const
char
*>
(
Data
),
Size
);
ares_create_query
(
s
.
c_str
(),
ns_c_in
,
ns_t_a
,
0x1234
,
0
,
&
buf
,
&
buflen
,
0
);
free
(
buf
);
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