From: Howard Chu Date: Mon, 5 Nov 2012 13:06:06 +0000 (-0800) Subject: ITS#7432 fix typo in mdb_midl_sort X-Git-Tag: OPENLDAP_REL_ENG_2_4_34~120^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb36bdcd1c22d1fbc6575452ef5c9112715ab083;p=openldap ITS#7432 fix typo in mdb_midl_sort Wasn't pushing the optimal half of the array onto the stack, thus used more stack than expected -> overrun. --- diff --git a/libraries/libmdb/midl.c b/libraries/libmdb/midl.c index 9ee100dc35..8de61e3d0c 100644 --- a/libraries/libmdb/midl.c +++ b/libraries/libmdb/midl.c @@ -232,7 +232,7 @@ mdb_midl_sort( MDB_IDL ids ) ids[l+1] = ids[j]; ids[j] = a; jstack += 2; - if (ir-i+1 >= j-1) { + if (ir-i+1 >= j-l) { istack[jstack] = ir; istack[jstack-1] = i; ir = j-1;