[Groonga-commit] groonga/groonga at 9be47ee [master] Use grn_strcpy()

Back to archive index

Kouhei Sutou null+****@clear*****
Thu May 12 15:21:51 JST 2016


Kouhei Sutou	2016-05-12 15:21:51 +0900 (Thu, 12 May 2016)

  New Revision: 9be47ee0351c8b303f5008217dd34ad4b1802c5f
  https://github.com/groonga/groonga/commit/9be47ee0351c8b303f5008217dd34ad4b1802c5f

  Message:
    Use grn_strcpy()

  Modified files:
    lib/db.c
    lib/proc.c

  Modified: lib/db.c (+1 -1)
===================================================================
--- lib/db.c    2016-05-12 15:15:48 +0900 (690bc19)
+++ lib/db.c    2016-05-12 15:21:51 +0900 (3781ebf)
@@ -13173,7 +13173,7 @@ static void
 grn_loader_save_error(grn_ctx *ctx, grn_loader *loader)
 {
   loader->rc = ctx->rc;
-  strcpy(loader->errbuf, ctx->errbuf);
+  grn_strcpy(loader->errbuf, GRN_CTX_MSGSIZE, ctx->errbuf);
 }
 
 static grn_id

  Modified: lib/proc.c (+1 -1)
===================================================================
--- lib/proc.c    2016-05-12 15:15:48 +0900 (29484b0)
+++ lib/proc.c    2016-05-12 15:21:51 +0900 (43497e6)
@@ -149,7 +149,7 @@ proc_load(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
   } else {
     if (ctx->impl->loader.rc != GRN_SUCCESS) {
       ctx->rc = ctx->impl->loader.rc;
-      strcpy(ctx->errbuf, ctx->impl->loader.errbuf);
+      grn_strcpy(ctx->errbuf, GRN_CTX_MSGSIZE, ctx->impl->loader.errbuf);
     }
     GRN_OUTPUT_INT64(ctx->impl->loader.nrecords);
     if (ctx->impl->loader.table) {
-------------- next part --------------
HTML����������������������������...
Download 



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