[Groonga-commit] groonga/groonga at f0982d2 [master] Fix out of bound array element access

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 20 21:52:39 JST 2014


Kouhei Sutou	2014-03-20 21:52:39 +0900 (Thu, 20 Mar 2014)

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

  Message:
    Fix out of bound array element access
    
    GitHub: fix #158
    
    Reported by dcb314. Thanks!!!

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+1 -1)
===================================================================
--- lib/ii.c    2014-03-20 17:35:29 +0900 (05415cc)
+++ lib/ii.c    2014-03-20 21:52:39 +0900 (469dbce)
@@ -86,7 +86,7 @@ segment_get(grn_ctx *ctx, grn_ii *ii)
           used[pseg] = 1;
         }
       }
-      for (pseg = 0; used[pseg] && pseg < MAX_PSEG; pseg++) ;
+      for (pseg = 0; pseg < MAX_PSEG && used[pseg]; pseg++) ;
       GRN_FREE(used);
       ii->header->pnext = pmax + 1;
     } else
-------------- next part --------------
HTML����������������������������...
Download 



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