From: Howard Chu Date: Sun, 28 Aug 2011 07:51:42 +0000 (-0700) Subject: Fix IDL off-by-one X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0480e9afd0a82994635262666f65b136154f4b;p=thirdparty%2Fopenldap.git Fix IDL off-by-one --- diff --git a/servers/slapd/back-mdb/idl.c b/servers/slapd/back-mdb/idl.c index 3655377e7c..b020931d36 100644 --- a/servers/slapd/back-mdb/idl.c +++ b/servers/slapd/back-mdb/idl.c @@ -341,7 +341,7 @@ mdb_idl_fetch_key( rc = mdb_cursor_get( cursor, key, &data, MDB_NEXT_MULTIPLE ); } if ( rc == MDB_NOTFOUND ) rc = 0; - ids[0] = i - ids; + ids[0] = i - &ids[1]; /* On disk, a range is denoted by 0 in the first element */ if (ids[1] == 0) { if (ids[0] != MDB_IDL_RANGE_SIZE) {