[Groonga-commit] groonga/groonga [master] windows: fix over allocated memory access

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 29 21:33:55 JST 2012


Kouhei Sutou	2012-10-29 21:33:55 +0900 (Mon, 29 Oct 2012)

  New Revision: 114f3940ac611a347cd9dcc5f2afbbe866903366
  https://github.com/groonga/groonga/commit/114f3940ac611a347cd9dcc5f2afbbe866903366

  Log:
    windows: fix over allocated memory access
    
    fixes #1532
    
    Patch by Akio Tajima. Thanks!!! Very thanks!!!

  Modified files:
    lib/util.c

  Modified: lib/util.c (+1 -1)
===================================================================
--- lib/util.c    2012-10-29 18:12:32 +0900 (57de9f4)
+++ lib/util.c    2012-10-29 21:33:55 +0900 (8c17f5c)
@@ -864,7 +864,7 @@ grn_win32_base_dir(void)
         win32_base_dir = ".";
       } else {
         char *path;
-        win32_base_dir = malloc(ansi_dll_filename_size);
+        win32_base_dir = malloc(ansi_dll_filename_size + 1);
         WideCharToMultiByte(CP_ACP, 0,
                             absolute_dll_filename, absolute_dll_filename_size,
                             win32_base_dir, ansi_dll_filename_size,
-------------- next part --------------
HTML����������������������������...
Download 



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