This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Please advice w.r.t. language/tcl


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]