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
Joe Martin
OpenLDAP
Commits
52e5e0aa
Commit
52e5e0aa
authored
Nov 04, 2009
by
Quanah Gibson-Mount
Browse files
More for ITS#6353
parent
2c3c10d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/lber.h
View file @
52e5e0aa
...
...
@@ -279,6 +279,9 @@ ber_get_stringb LDAP_P((
#define LBER_BV_ALLOC 0x01
/* allocate/copy result, otherwise in-place */
#define LBER_BV_NOTERM 0x02
/* omit NUL-terminator if parsing in-place */
#define LBER_BV_STRING 0x04
/* fail if berval contains embedded \0 */
/* LBER_BV_STRING currently accepts a terminating \0 in the berval, because
* Active Directory sends that in at least the diagonsticMessage field.
*/
LBER_F
(
ber_tag_t
)
ber_get_stringbv
LDAP_P
((
...
...
libraries/liblber/decode.c
View file @
52e5e0aa
...
...
@@ -481,7 +481,8 @@ ber_get_stringbv( BerElement *ber, struct berval *bv, int option )
tag
=
ber_skip_element
(
ber
,
bv
);
if
(
tag
==
LBER_DEFAULT
||
((
option
&
LBER_BV_STRING
)
&&
memchr
(
bv
->
bv_val
,
0
,
bv
->
bv_len
)))
((
option
&
LBER_BV_STRING
)
&&
bv
->
bv_len
&&
memchr
(
bv
->
bv_val
,
0
,
bv
->
bv_len
-
1
)))
{
bv
->
bv_val
=
NULL
;
return
LBER_DEFAULT
;
...
...
@@ -518,7 +519,9 @@ ber_get_stringbv_null( BerElement *ber, struct berval *bv, int option )
return
tag
;
}
if
((
option
&
LBER_BV_STRING
)
&&
memchr
(
bv
->
bv_val
,
0
,
bv
->
bv_len
))
{
if
((
option
&
LBER_BV_STRING
)
&&
memchr
(
bv
->
bv_val
,
0
,
bv
->
bv_len
-
1
))
{
bv
->
bv_val
=
NULL
;
return
LBER_DEFAULT
;
}
...
...
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