From: Howard Chu Date: Wed, 20 Feb 2013 02:19:47 +0000 (-0800) Subject: ITS#7527 add missing error checks for corrupt index X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f827aa683ecd61ce7528c4351789eebf13b07911;p=openldap ITS#7527 add missing error checks for corrupt index --- diff --git a/servers/slapd/back-mdb/idl.c b/servers/slapd/back-mdb/idl.c index 2cba7c2759..eee2afc670 100644 --- a/servers/slapd/back-mdb/idl.c +++ b/servers/slapd/back-mdb/idl.c @@ -505,9 +505,17 @@ mdb_idl_insert_keys( if ( id < lo || id > hi ) { /* position on lo */ rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP ); + if ( rc != 0 ) { + err = "c_get lo"; + goto fail; + } if ( id > hi ) { /* position on hi */ rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP ); + if ( rc != 0 ) { + err = "c_get hi"; + goto fail; + } } data.mv_size = sizeof(ID); data.mv_data = &id;