This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Please advice w.r.t. language/tcl
- From: Andrew Lunn <andrew at lunn dot ch>
- To: ?yvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Tue, 17 Jun 2008 21:34:05 +0200
- Subject: Re: Please advice w.r.t. language/tcl
- References: <c09652430806170914t63890b1akcb1efc15c164dee5@mail.gmail.com>
On Tue, Jun 17, 2008 at 06:14:47PM +0200, ?yvind Harboe wrote:
> Jim Tcl contains an eCos repository in CVS HEAD.
>
>
> http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jim/jim/ecos/
Hi Oyvind
I have gcc 4.3.1 installed as the host compiler. I just tried
compiling the jim tcl interpreter with synth, ie the host tools and i
get a warning:
/home/lunn/eCos/anoncvs-clean/packages/net/athttpd/current/src/jim-aio.c:140: warning: array subscript is above array bounds
The code fragment is:
/* GETS */
char buf[AIO_BUF_LEN];
Jim_Obj *objPtr;
if (argc != 2 && argc != 3) {
Jim_WrongNumArgs(interp, 2, argv, "?varName?");
return JIM_ERR;
}
objPtr = Jim_NewStringObj(interp, NULL, 0);
while (1) {
int more = 0;
buf[AIO_BUF_LEN-1] = '_';
if (fgets(buf, AIO_BUF_LEN, af->fp) == NULL)
break;
if (buf[AIO_BUF_LEN-1] == '\0' && buf[AIO_BUF_LEN] == '\n')
buf[AIO_BUF_LEN] is a buffer overrun by one.
Andrew