Commit bb36bdcd authored by Howard Chu's avatar Howard Chu
Browse files

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.
parent 0108327c
...@@ -232,7 +232,7 @@ mdb_midl_sort( MDB_IDL ids ) ...@@ -232,7 +232,7 @@ mdb_midl_sort( MDB_IDL ids )
ids[l+1] = ids[j]; ids[l+1] = ids[j];
ids[j] = a; ids[j] = a;
jstack += 2; jstack += 2;
if (ir-i+1 >= j-1) { if (ir-i+1 >= j-l) {
istack[jstack] = ir; istack[jstack] = ir;
istack[jstack-1] = i; istack[jstack-1] = i;
ir = j-1; ir = j-1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment