Markus Neteler wrote:

> > But more significantly, G_message() etc use an internal buffer of 2000
> > bytes. A message longer than that probably won't work and may well
> > cause the g.message to crash.
> 
> How about (ab)using GPATH_MAX (include/gis.h) which is 4096 chars long
> and using it in
> general/g.message/main.c as well to avoid a buffer overflow?

Having g.message limit the length of a message would work for
g.message.

For G_message() etc, using vsnprintf() would work, but that's C99.

G_vasprintf() should work, but our private implementation (used if
asprintf() doesn't exist) also requires C99.

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to