Patch for run-1.3.0-1 core dump
Mon Aug 12 14:22:00 GMT 2013
On 8/10/2013 1:34 PM, foo wrote:
> Whenever I execute run.exe, it generates run.exe.stackdump.
> At line 370 in run.c, run2_freeargv() tries to free newargv, and
> run2_freeqrgv() expects that newargv is terminated by NULL. However,
> in shifting newargv at line 253-256, it fails to shift NULL
> terminator. Therefore, run2_freeargv() frees memory illegally.
> The following patch is a workaround.
> --- run.c.old
> +++ run.c.new
> @@ -252,7 +252,7 @@
> newargv = run2_dupargv (argv);
> /* discard newargv and shift up */
> free (newargv);
> - for (newargc = 1; newargc < argc; newargc++)
> + for (newargc = 1; newargv[newargc-1] != NULL; newargc++)
> newargv[newargc-1] = newargv[newargc];
> newargc = argc - 1;
Thanks for the bug report and the patch. I'll investigate and update the
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin