[Groonga-commit] groonga/groonga at a2121da [master] expr: fix a crash bug that happens when many arguments are passed

Back to archive index

Susumu Yata null+****@clear*****
Fri Nov 24 10:50:07 JST 2017


Susumu Yata	2017-11-24 10:50:07 +0900 (Fri, 24 Nov 2017)

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

  Message:
    expr: fix a crash bug that happens when many arguments are passed
    
    GitHub: #760

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+1 -0)
===================================================================
--- lib/expr.c    2017-11-23 11:19:54 +0900 (62f072ad8)
+++ lib/expr.c    2017-11-24 10:50:07 +0900 (0c38e0ae2)
@@ -4420,6 +4420,7 @@ grn_scan_info_push_arg(grn_ctx *ctx, scan_info *si, grn_obj *arg)
       if (args == NULL) {
         return GRN_FALSE;
       }
+      grn_memcpy(args, si->args, sizeof(grn_obj *) * si->nargs);
     } else {
       args = (grn_obj **)GRN_REALLOC(si->args, sizeof(grn_obj *) * max_nargs);
       if (args == NULL) {
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20171124/41e7391f/attachment.htm 



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