[Groonga-commit] groonga/groonga [master] Fixed a buffer over run problem.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 7月 26日 (月) 11:26:03 JST


Daijiro MORI	2010-07-26 02:26:03 +0000 (Mon, 26 Jul 2010)

  New Revision: d4d9038766bb171d4f795f9e63fe10fb2f095a90

  Log:
    Fixed a buffer over run problem.

  Modified files:
    lib/str.c

  Modified: lib/str.c (+1 -1)
===================================================================
--- lib/str.c    2010-07-23 12:55:15 +0000 (7dcc4be)
+++ lib/str.c    2010-07-26 02:26:03 +0000 (7c876c9)
@@ -3162,7 +3162,7 @@ grn_str_url_path_normalize(grn_ctx *ctx, const char *path, size_t path_len,
       memcpy(b, p, (pc - p));
       b += pc - p;
       p = pc;
-      if (*pc == '/' && be > b) {
+      if (p < pe && *pc == '/' && be > b) {
         *b++ = PATH_SEPARATOR[0];
         p++;
       }




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