[Groonga-mysql-commit] mroonga/mroonga [master] Fix overflow

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2012年 3月 8日 (木) 23:24:28 JST


Kouhei Sutou	2012-03-08 23:24:28 +0900 (Thu, 08 Mar 2012)

  New Revision: 42e6484f43f44c790d038e43f33fb81672da374f

  Log:
    Fix overflow

  Modified files:
    mrn_sys.c

  Modified: mrn_sys.c (+2 -2)
===================================================================
--- mrn_sys.c    2012-03-08 21:35:20 +0900 (f234e10)
+++ mrn_sys.c    2012-03-08 23:24:28 +0900 (3f19dae)
@@ -142,7 +142,7 @@ char *mrn_table_name_gen(const char *arg, char *dest)
     dest[j++] = 'f';
     i++;
   }
-  for (; i <= len ;) {
+  for (; i < len ;) {
     dest[j++] = arg[++i];
   }
   dest[j] = '\0';
@@ -157,7 +157,7 @@ char *mrn_table_name_gen_for_mysql(const char *arg, char *dest)
   int len = strlen(arg);
   int i=len, j=0;
   for (; arg[--i] != '/' ;) {}
-  for (; i <= len ;) {
+  for (; i < len ;) {
     dest[j++] = arg[++i];
   }
   dest[j] = '\0';




Groonga-mysql-commit メーリングリストの案内
アーカイブの一覧に戻る