[GRASS5] Buffer overflow in G_recreate_command()...

Eric G. Miller egm2 at jps.net
Sun Jun 3 23:04:06 EDT 2001


On Sun, Jun 03, 2001 at 05:00:53PM -0700, Eric G. Miller wrote:
[snip]
> I wonder if the buffers for G_recreate_command() and the display drivers
> (at least for the pad list) should be up to ARG_MAX or at least
> _POSIX_ARG_MAX which must be at least 4096.  G_recreate_command() should
> also have better behavior when it's limits are reached (it currently
> abuses strcat).

I modified G_recreate_command to use a buffer of ARG_MAX size and to
make sure the buffer isn't overrun.  Still, I get a sigpipe from the X
server and it exits.  I traced it on the client side to the point in
Rasterlib where flushout() is called by _send_char.  Is there some
problem here if the buffer is flushed, but the communication is not
complete?  

-- 
Eric G. Miller <egm2 at jps.net>



More information about the grass-dev mailing list