Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
97b0c98a
Commit
97b0c98a
authored
May 13, 2007
by
Howard Chu
Browse files
Don't use strdup on bervals
parent
6d01c815
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/schema_init.c
View file @
97b0c98a
...
...
@@ -2117,7 +2117,11 @@ IA5StringNormalize(
/* Ignore initial whitespace */
while
(
ASCII_SPACE
(
*
p
)
)
p
++
;
normalized
->
bv_val
=
ber_strdup_x
(
p
,
ctx
);
normalized
->
bv_len
=
val
->
bv_len
-
(
p
-
val
->
bv_val
);
normalized
->
bv_val
=
slap_sl_malloc
(
normalized
->
bv_len
+
1
,
ctx
);
AC_MEMCPY
(
normalized
->
bv_val
,
p
,
normalized
->
bv_len
);
normalized
->
bv_val
[
normalized
->
bv_len
]
=
'\0'
;
p
=
q
=
normalized
->
bv_val
;
while
(
*
p
)
{
...
...
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