[Groonga-commit] groonga/groonga at cc8c671 [master] ii: fix wrong the max number of vector elements detection

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Nov 28 00:50:53 JST 2017


Kouhei Sutou	2017-11-28 00:50:53 +0900 (Tue, 28 Nov 2017)

  New Revision: cc8c67196c0382955fefe5a32fc90acd868a7a34
  https://github.com/groonga/groonga/commit/cc8c67196c0382955fefe5a32fc90acd868a7a34

  Message:
    ii: fix wrong the max number of vector elements detection
    
    [groonga-dev,04533]
    
    The code is only used when static index build, vector column is target
    and lexicon has tokenizer. It also leaks memory. If we have many
    records, it may crash Groonga by bulk overflow.
    
    It was introduced at ad7c2a88c3d239677ac49d7e2156e66818008ab3.
    
    Reported by Toshio Uchiyama. Thanks!!!

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+1 -0)
===================================================================
--- lib/ii.c    2017-11-27 15:46:47 +0900 (d6ac9f917)
+++ lib/ii.c    2017-11-28 00:50:53 +0900 (5749218e3)
@@ -12232,6 +12232,7 @@ grn_ii_builder_set_sid_bits(grn_ctx *ctx, grn_ii_builder *builder)
       if (rid == GRN_ID_NIL) {
         break;
       }
+      GRN_BULK_REWIND(&obj);
       if (!grn_obj_get_value(ctx, builder->srcs[0], rid, &obj)) {
         continue;
       }
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171128/3884dc2b/attachment.htm 



More information about the Groonga-commit mailing list
Back to archive index