Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
0145d543
Commit
0145d543
authored
Nov 29, 2004
by
Howard Chu
Browse files
In build_new_dn, rdn may be part of a larger string, use strncopy.
parent
2c89c53c
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/dn.c
View file @
0145d543
...
...
@@ -1299,7 +1299,7 @@ build_new_dn( struct berval * new_dn,
new_dn
->
bv_len
=
parent_dn
->
bv_len
+
newrdn
->
bv_len
+
1
;
new_dn
->
bv_val
=
(
char
*
)
slap_sl_malloc
(
new_dn
->
bv_len
+
1
,
memctx
);
ptr
=
lutil_strcopy
(
new_dn
->
bv_val
,
newrdn
->
bv_val
);
ptr
=
lutil_str
n
copy
(
new_dn
->
bv_val
,
newrdn
->
bv_val
,
newrdn
->
bv_len
);
*
ptr
++
=
','
;
strcpy
(
ptr
,
parent_dn
->
bv_val
);
}
...
...
Write
Preview
Supports
Markdown
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