Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DNS-Compliance-Testing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
DNS-Compliance-Testing
Commits
85ed1dca
Commit
85ed1dca
authored
Feb 22, 2018
by
Ondřej Surý
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace strlcpy/strlcat with strncpy/strncat, they are perfectly safe for this kind of usage here
parent
29db4602
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
genreport.c
genreport.c
+7
-7
No files found.
genreport.c
View file @
85ed1dca
...
...
@@ -616,7 +616,7 @@ printandfree(struct summary *summary) {
}
if
(
addr
==
NULL
)
str
l
cpy
(
addrbuf
,
"<unknown>"
,
sizeof
(
addrbuf
));
str
n
cpy
(
addrbuf
,
"<unknown>"
,
sizeof
(
addrbuf
));
else
inet_ntop
(
summary
->
storage
.
ss_family
,
addr
,
addrbuf
,
sizeof
(
addrbuf
));
...
...
@@ -630,7 +630,7 @@ printandfree(struct summary *summary) {
if
(
opts
[
i
].
what
!=
0
&&
(
opts
[
i
].
what
&
what
)
==
0
)
continue
;
if
(
summary
->
results
[
i
][
0
]
==
0
)
str
l
cpy
(
summary
->
results
[
i
],
"skipped"
,
100
);
str
n
cpy
(
summary
->
results
[
i
],
"skipped"
,
100
);
if
(
strcmp
(
opts
[
i
].
name
,
"do"
)
==
0
)
x
=
i
;
if
(
strcmp
(
opts
[
i
].
name
,
"ednstcp"
)
==
0
&&
x
!=
-
1
&&
...
...
@@ -789,8 +789,8 @@ freeitem(struct workitem * item) {
static
void
addtag
(
struct
workitem
*
item
,
const
char
*
tag
)
{
char
*
result
=
item
->
summary
->
results
[
item
->
test
];
if
(
result
[
0
])
str
l
cat
(
result
,
","
,
100
);
str
l
cat
(
result
,
tag
,
100
);
if
(
result
[
0
])
str
n
cat
(
result
,
","
,
100
);
str
n
cat
(
result
,
tag
,
100
);
}
/*
...
...
@@ -929,7 +929,7 @@ dotest(struct workitem *item) {
*/
dn_expand
(
item
->
buf
,
item
->
buf
+
n
,
item
->
buf
+
12
,
name
,
sizeof
(
name
));
str
l
cpy
(
item
->
summary
->
zone
,
name
,
str
n
cpy
(
item
->
summary
->
zone
,
name
,
sizeof
(
item
->
summary
->
zone
));
}
...
...
@@ -1183,12 +1183,12 @@ dolookup(struct workitem *item, int type) {
switch
(
type
)
{
case
ns_t_ns
:
str
l
cpy
(
item
->
summary
->
zone
,
name
,
str
n
cpy
(
item
->
summary
->
zone
,
name
,
sizeof
(
item
->
summary
->
zone
));
break
;
case
ns_t_a
:
case
ns_t_aaaa
:
str
l
cpy
(
item
->
summary
->
ns
,
name
,
str
n
cpy
(
item
->
summary
->
ns
,
name
,
sizeof
(
item
->
summary
->
zone
));
break
;
}
...
...
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