ahFeel
2007-Feb-16 09:33 UTC
[Ferret-talk] Bug in IndexSearcher with limit => all and any offset
Here''s the deal: static TopDocs *isea_search_w(Searcher *self, Weight *weight, int first_doc, // OFFSET int num_docs, // LIMIT Filter *filter, Sort *sort, filter_ft filter_func, bool load_fields) { int max_size = first_doc + num_docs; Actually, when you have limit => :all, num_docs equals to INT_MAX, so adding a value to it makes a nice int overflow :/ The diff patch is here: http://pastie.caboo.se/40748 I''ve told Dave by mail but it seems like he''s very busy lately, hope someone else can release some fix here :) -- J?r?mie ''ahFeel'' BORDIER Rift Technologies - http://www.rift.fr -- Posted via http://www.ruby-forum.com/.
David Balmain
2007-Feb-22 07:20 UTC
[Ferret-talk] Bug in IndexSearcher with limit => all and any offset
On 2/16/07, ahFeel <ahfeel_nospam_ at rift.fr> wrote:> Here''s the deal: > > static TopDocs *isea_search_w(Searcher *self, > Weight *weight, > int first_doc, // OFFSET > int num_docs, // LIMIT > Filter *filter, > Sort *sort, > filter_ft filter_func, > bool load_fields) > { > int max_size = first_doc + num_docs; > > Actually, when you have limit => :all, num_docs equals to INT_MAX, so > adding a value to it makes a nice int overflow :/ > > The diff patch is here: > http://pastie.caboo.se/40748 > > I''ve told Dave by mail but it seems like he''s very busy lately, hope > someone else can release some fix here :)Thanks J?r?mie, this bug has been fixed. -- Dave Balmain http://www.davebalmain.com/