[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] TCL_signal_error bug
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] TCL_signal_error bug |
Date: |
Wed, 28 Aug 2013 10:36:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Greetings, and thanks! Applied in master.
Jerry James <address@hidden> 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 address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah