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
Tero Saarni
OpenLDAP
Commits
fa82424b
Commit
fa82424b
authored
Feb 14, 2012
by
Howard Chu
Committed by
Quanah Gibson-Mount
Feb 15, 2012
Browse files
ITS#7143 fix attr_dup2 when no values are present (attrsOnly = TRUE)
parent
8e00923e
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/attr.c
View file @
fa82424b
...
...
@@ -232,13 +232,16 @@ attr_dup2( Attribute *tmp, Attribute *a )
if
(
a
->
a_nvals
!=
a
->
a_vals
)
{
tmp
->
a_nvals
=
ch_malloc
(
(
tmp
->
a_numvals
+
1
)
*
sizeof
(
struct
berval
)
);
for
(
j
=
0
;
!
BER_BVISNULL
(
&
a
->
a_nvals
[
j
]
);
j
++
)
{
assert
(
j
<
i
);
ber_dupbv
(
&
tmp
->
a_nvals
[
j
],
&
a
->
a_nvals
[
j
]
);
if
(
BER_BVISNULL
(
&
tmp
->
a_nvals
[
j
]
)
)
break
;
/* FIXME: error? */
j
=
0
;
if
(
i
)
{
for
(
;
!
BER_BVISNULL
(
&
a
->
a_nvals
[
j
]
);
j
++
)
{
assert
(
j
<
i
);
ber_dupbv
(
&
tmp
->
a_nvals
[
j
],
&
a
->
a_nvals
[
j
]
);
if
(
BER_BVISNULL
(
&
tmp
->
a_nvals
[
j
]
)
)
break
;
/* FIXME: error? */
}
assert
(
j
==
i
);
}
assert
(
j
==
i
);
BER_BVZERO
(
&
tmp
->
a_nvals
[
j
]
);
}
else
{
...
...
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