[Groonga-commit] groonga/groonga [master] fixed possible overlap in memcpy

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 12日 (月) 16:19:40 JST


Daijiro MORI	2011-12-12 07:19:40 +0000 (Mon, 12 Dec 2011)

  New Revision: 92f348ca83bd333957656f71cb7e282df97360f8

  Log:
    fixed possible overlap in memcpy

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+1 -1)
===================================================================
--- lib/expr.c    2011-12-12 05:53:47 +0000 (90fc4ee)
+++ lib/expr.c    2011-12-12 07:19:40 +0000 (b804052)
@@ -3487,7 +3487,7 @@ put_logical_op(grn_ctx *ctx, scan_info **sis, int *ip, grn_operator op, int star
               s_->flags &= ~SCAN_PUSH;
               s_->logical_op = op;
               memcpy(&sis[i], &sis[j], sizeof(scan_info *) * (r - j));
-              memcpy(&sis[j], &sis[r], sizeof(scan_info *) * (i - r));
+              memmove(&sis[j], &sis[r], sizeof(scan_info *) * (i - r));
               memcpy(&sis[i + j - r], &sis[i], sizeof(scan_info *) * (r - j));
             }
             break;




Groonga-commit メーリングリストの案内
Back to archive index