Greetings, and thanks!  Applied in master.

Jerry James <[email protected]> writes:

> I happened to spot a gcc warning when building the latest GCL release
> (thanks, Camm!) for Fedora.  The function TCL_signal_error() in
> gcl/gcl-tk/tkMain.c has an sprintf call that omits the buffer it is
> supposed to be printing into.  I think this patch is appropriate:
>
> diff --git a/gcl/gcl-tk/tkMain.c b/gcl/gcl-tk/tkMain.c
> index 9b1ee37..39a12e1 100755
> --- a/gcl/gcl-tk/tkMain.c
> +++ b/gcl/gcl-tk/tkMain.c
> @@ -191,7 +191,7 @@ static void
>  TCL_signal_error(x)
>       char *x;
>  {char buf[300] ;
> - sprintf("error %s",x);
> + snprintf(buf,300,"error %s",x);
>   Tcl_Eval(interp,buf);
>   dfprintf(stderr,x);
>  }
>
> Regards,

Take care,
-- 
Camm Maguire                                        [email protected]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

_______________________________________________
Gcl-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to