Revision: 4129 http://geany.svn.sourceforge.net/geany/?rev=4129&view=rev Author: ntrel Date: 2009-08-26 15:32:17 +0000 (Wed, 26 Aug 2009)
Log Message: ----------- Fix invalid memory read (#2844632, patch by Lex Trotman, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-08-26 14:56:05 UTC (rev 4128) +++ trunk/ChangeLog 2009-08-26 15:32:17 UTC (rev 4129) @@ -8,6 +8,8 @@ * src/keybindings.h, src/makefile.win32, src/project.h, src/filetypes.h, src/Makefile.am, wscript: Use GEANY_PRIVATE to hide some fields from plugins. + * src/build.c: + Fix invalid memory read (#2844632, patch by Lex Trotman, thanks).
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2009-08-26 14:56:05 UTC (rev 4128) +++ trunk/src/build.c 2009-08-26 15:32:17 UTC (rev 4129) @@ -2351,21 +2351,21 @@ { GtkWidget *item; GtkWidget *toolmenu; - gint i, cmdindex; + gint cmdindex;
ft_def = g_new0(GeanyBuildCommand, build_groups_count[GEANY_GBG_FT]); non_ft_def = g_new0(GeanyBuildCommand, build_groups_count[GEANY_GBG_NON_FT]); exec_def = g_new0(GeanyBuildCommand, build_groups_count[GEANY_GBG_EXEC]); run_info = g_new0(RunInfo, build_groups_count[GEANY_GBG_EXEC]); - for (cmdindex=0; default_cmds[cmdindex].entries[i] != NULL; ++cmdindex) + for (cmdindex=0; default_cmds[cmdindex].entries[GEANY_BC_COMMAND] != NULL; ++cmdindex) { - enum GeanyBuildCmdEntries k; + enum GeanyBuildCmdEntries k; GeanyBuildCommand *cmd = &((*(default_cmds[cmdindex].ptr))[ default_cmds[cmdindex].index ]); cmd->exists = TRUE; - FOREACH_GEANYBUILDCMD_ENTRY(k) - { - cmd->entries[k] = g_strdup(default_cmds[cmdindex].entries[k]); - } + FOREACH_GEANYBUILDCMD_ENTRY(k) + { + cmd->entries[k] = g_strdup(default_cmds[cmdindex].entries[k]); + } }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.