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
ce6d302c
Commit
ce6d302c
authored
Aug 13, 2020
by
Howard Chu
Committed by
Quanah Gibson-Mount
Aug 28, 2020
Browse files
ITS#9135 fix index error on collapsed range
parent
d7fd65da
Changes
1
Hide whitespace changes
Inline
Side-by-side
servers/slapd/back-mdb/idl.c
View file @
ce6d302c
...
...
@@ -625,9 +625,30 @@ mdb_idl_delete_keys(
}
if
(
lo2
>=
hi2
)
{
/* The range has collapsed... */
rc
=
mdb_cursor_del
(
cursor
,
MDB_NODUPDATA
);
/* delete the range marker */
rc
=
mdb_cursor_del
(
cursor
,
0
);
if
(
rc
!=
0
)
{
err
=
"c_del dup"
;
err
=
"c_del dup1"
;
goto
fail
;
}
/* skip past deleted marker */
rc
=
mdb_cursor_get
(
cursor
,
&
key
,
&
data
,
MDB_NEXT_DUP
);
if
(
rc
!=
0
)
{
err
=
"c_get dup1"
;
goto
fail
;
}
/* delete the requested id */
if
(
id
==
hi
)
{
/* skip lo */
rc
=
mdb_cursor_get
(
cursor
,
&
key
,
&
data
,
MDB_NEXT_DUP
);
if
(
rc
!=
0
)
{
err
=
"c_get dup2"
;
goto
fail
;
}
}
rc
=
mdb_cursor_del
(
cursor
,
0
);
if
(
rc
!=
0
)
{
err
=
"c_del dup2"
;
goto
fail
;
}
}
else
{
...
...
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