Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
edcb3788
Commit
edcb3788
authored
Nov 22, 2018
by
Mark Andrews
Browse files
replace strncpy + setting end of array to NUL with strlcpy
parent
7eb17b96
Pipeline
#7064
passed with stages
in 13 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bin/tests/system/dlzexternal/driver.c
View file @
edcb3788
...
...
@@ -128,14 +128,11 @@ add_name(struct dlz_example_data *state, struct record *list,
strlen
(
data
)
>=
sizeof
(
list
[
i
].
data
))
return
(
ISC_R_NOSPACE
);
strncpy
(
list
[
i
].
name
,
name
,
sizeof
(
list
[
i
].
name
));
list
[
i
].
name
[
sizeof
(
list
[
i
].
name
)
-
1
]
=
'\0'
;
strlcpy
(
list
[
i
].
name
,
name
,
sizeof
(
list
[
i
].
name
));
strncpy
(
list
[
i
].
type
,
type
,
sizeof
(
list
[
i
].
type
));
list
[
i
].
type
[
sizeof
(
list
[
i
].
type
)
-
1
]
=
'\0'
;
strlcpy
(
list
[
i
].
type
,
type
,
sizeof
(
list
[
i
].
type
));
strncpy
(
list
[
i
].
data
,
data
,
sizeof
(
list
[
i
].
data
));
list
[
i
].
data
[
sizeof
(
list
[
i
].
data
)
-
1
]
=
'\0'
;
strlcpy
(
list
[
i
].
data
,
data
,
sizeof
(
list
[
i
].
data
));
list
[
i
].
ttl
=
ttl
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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