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
Nadezhda Ivanova
OpenLDAP
Commits
fde1f80a
Commit
fde1f80a
authored
Apr 23, 2012
by
Ondrej Kuznik
Committed by
Howard Chu
Jul 08, 2014
Browse files
ITS#7256 Add some necessary checks.
parent
304c0cbb
Changes
1
Show whitespace changes
Inline
Side-by-side
servers/slapd/slapmodify.c
View file @
fde1f80a
...
...
@@ -282,7 +282,8 @@ slapmodify( int argc, char **argv )
e
=
e_tmp
;
}
for
(
n
=
0
;
lr
.
lrop_mods
[
n
]
!=
NULL
;
n
++
)
{
if
(
lr
.
lrop_mods
)
{
for
(
n
=
0
;
lr
.
lrop_mods
&&
lr
.
lrop_mods
[
n
]
!=
NULL
;
n
++
)
{
LDAPMod
*
mod
=
lr
.
lrop_mods
[
n
];
Modification
mods
=
{
0
};
unsigned
i
=
0
;
...
...
@@ -327,12 +328,15 @@ slapmodify( int argc, char **argv )
;
}
if
(
i
!=
0
)
{
mods
.
sm_values
=
SLAP_CALLOC
(
sizeof
(
struct
berval
),
i
+
1
);
if
(
normalize
)
{
mods
.
sm_nvalues
=
SLAP_CALLOC
(
sizeof
(
struct
berval
),
i
+
1
);
}
else
{
mods
.
sm_nvalues
=
NULL
;
}
}
mods
.
sm_numvals
=
i
;
for
(
i
=
0
;
i
<
mods
.
sm_numvals
;
i
++
)
{
...
...
@@ -449,6 +453,7 @@ slapmodify( int argc, char **argv )
entry_free
(
e
);
break
;
}
}
if
(
SLAP_LASTMOD
(
be
)
)
{
time_t
now
=
slap_get_time
();
...
...
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