diff --git a/src/ChangeLog b/src/ChangeLog index c5394c77..aabfaf57 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-06-19 Giuseppe Scrivano + + * mswindows.c (fake_fork_child): Revert dinamic allocation of + info->lfilename. + Reported by: Gisle Vanem . + 2014-06-16 Darshit Shah * test.c: Include locale.h header for gettext. diff --git a/src/mswindows.c b/src/mswindows.c index 3bdf2178..0a0a8682 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -123,7 +123,7 @@ struct fake_fork_info { HANDLE event; bool logfile_changed; - char *lfilename; + char lfilename[MAX_PATH + 1]; }; /* Determines if we are the child and if so performs the child logic. @@ -165,7 +165,7 @@ fake_fork_child (void) if (new_log_fp) { info->logfile_changed = true; - info->lfilename = strdup (opt.lfilename); + snprintf (info->filename, sizeof (info->lfilename), "%s", opt.lfilename); fclose (new_log_fp); } }