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
53338dc4
Commit
53338dc4
authored
May 18, 2000
by
Kurt Zeilenga
Browse files
Fix nul ('\0') string termination bug introduced by use of
memalloc/memcpy instead of strdup
parent
c48155a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/libldif/line64.c
View file @
53338dc4
...
...
@@ -223,7 +223,7 @@ done:
}
if
(
!
url
&&
value
!=
NULL
)
{
p
=
ber_memalloc
(
vlen
);
p
=
ber_memalloc
(
vlen
+
1
);
if
(
p
==
NULL
)
{
ber_pvt_log_printf
(
LDAP_DEBUG_ANY
,
ldif_debug
,
"ldif_parse_line: value malloc failed
\n
"
);
...
...
@@ -232,6 +232,7 @@ done:
return
(
-
1
);
}
memcpy
(
p
,
value
,
vlen
);
p
[
vlen
]
=
'\0'
;
value
=
p
;
}
...
...
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