[GRASS-dev] [bug #4868] (grass) r.mapcalc: segfault in 'if then'
Glynn Clements
glynn at gclements.plus.com
Thu Jul 20 06:19:18 EDT 2006
Maciek Sieczka via RT wrote:
> > > r.mapcalc 'map=if(dtm,1)'
> > > Segmentation fault
> >
> > I am unable to reproduce this.
> >
> > Please provide a recipe to reproduce this with either the Spearfish
> > sample data or self-generated data.
>
> Indeed, this is not 100% reproducible. Somehow it depends on a combination of
> input/output raster name lenght and the raster type (double/float/integer).
Okay, found it. The type inference code for if() was assigning types
to the 2nd/3rd/4th arguments regardless of whether that many arguments
were actually present, overflowing the array.
I've committed a fix to CVS.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list