[Groonga-commit] groonga/groonga [master] ensure null termination of plugin pathname.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 2月 17日 (木) 22:16:37 JST


Toshihisa	2011-02-17 13:16:37 +0000 (Thu, 17 Feb 2011)

  New Revision: 95d65b3f1ef81915a94d5ad52f4cb212fd46edbe

  Log:
    ensure null termination of plugin pathname.

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+1 -0)
===================================================================
--- lib/proc.c    2011-02-17 13:14:49 +0000 (4e9977b)
+++ lib/proc.c    2011-02-17 13:16:37 +0000 (09535fe)
@@ -2003,6 +2003,7 @@ proc_register(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
 {
   if (GRN_TEXT_LEN(VAR(0))) {
     const char *name;
+    GRN_TEXT_PUTC(ctx, VAR(0), '\0');
     name = GRN_TEXT_VALUE(VAR(0));
     grn_plugin_register(ctx, name);
   } else {




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