summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorsemery <none@none>2008-02-05 10:13:40 -0800
committersemery <none@none>2008-02-05 10:13:40 -0800
commit3605ad6f0044065c54582650a845c977b81e1c3e (patch)
tree06a4f153047db9f757e63f13f09f7482bfae6995 /usr
parent1b83305cfc332b1e19ad6a194b73b2975e6bf79a (diff)
downloadillumos-gate-3605ad6f0044065c54582650a845c977b81e1c3e.tar.gz
6618414 Kerberos KDC db integrity issue
Diffstat (limited to 'usr')
-rw-r--r--usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/bt_split.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/bt_split.c b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/bt_split.c
index 75de43ae34..a7222afb6a 100644
--- a/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/bt_split.c
+++ b/usr/src/lib/krb5/plugins/kdb/db2/libdb2/btree/bt_split.c
@@ -729,7 +729,12 @@ bt_psplit(t, h, l, r, pskip, ilen)
* the right page.
*/
if (skip <= off) {
- skip = 0;
+ /*
+ * If we get here then 'skip' is in the left page. We do
+ * not want to mix this with the right page, so we assign
+ * an unrealistic value (-1).
+ */
+ skip = (indx_t)-1;
rval = l;
} else {
rval = r;
@@ -739,7 +744,11 @@ bt_psplit(t, h, l, r, pskip, ilen)
for (off = 0; nxt < top; ++off) {
if (skip == nxt) {
++off;
- skip = 0;
+ /*
+ * Assign 'skip' an unrealistic value (-1) to ensure
+ * it is not matched again.
+ */
+ skip = (indx_t)-1;
}
switch (h->flags & P_TYPE) {
case P_BINTERNAL: