[GRASS5] raster filename length problem
glynn at gclements.plus.com
Wed Jul 13 21:00:08 EDT 2005
Markus Neteler wrote:
> > More generally, it would help if we had standardised NAME_MAX and
> > MAPSET_MAX constants, rather than having arbitrary integer literals
> > scattered all over the code.
> I'll try whenever I come across NAME/MAPSET definitions to set them
> to NAME_MAX,MAPSET_MAX. Before adding those to gis.h, how long?
> Is 100 ok during the migration to NAME_MAX,MAPSET_MAX? I'm not
> sure how to capture string overflows.
The set_data program limits the location and mapset to 25 characters
each (not including the terminating NUL). I suggest 256 for NAME_MAX
(most filesystems impose a limit of 255 bytes or less for filenames).
I can't think of a reliable way of locating undersized buffers other
than waiting for bug reports.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev