Isn't line 27 in platform/platform_unix.c a small bug (buffer overrun by 1)?
Buf[MaxLen] = '\0';
In other words if MaxLen is the maximum length of the buffer, writing '\0' at
position MaxLen is one past the end of the buffer.
Compiling picoc on OS X with this line generates "Abort trap" when picoc is
launched in interactive mode.
Removing this line altogether and recompiling picoc solved the problem for me.
I don't think this line is even necessary since the next line is strncpy(Buf,
InLine, MaxLen-1).
Original issue reported on code.google.com by n...@d-type.com on 8 Apr 2013 at 4:30
Original issue reported on code.google.com by
n...@d-type.com
on 8 Apr 2013 at 4:30