[Date Prev][Date Next] [Chronological] [Thread] [Top]

ITS#1570 slapd crashes during search query



The code for idl_intersection may not be optimal but it looks OK to me. I
don't see how it would insert duplicates into the result unless one of its
input arrays already had duplicates, which should never happen. Am I going
blind?

Nevertheless, this simple patch may help to avoid dups:

                 if ( ID_BLOCK_ID(b, bi) == ID_BLOCK_ID(a, ai) ) {
                         ID_BLOCK_ID(n, ni++) = ID_BLOCK_ID(a, ai);
+                        bi++;
                 }

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support