[GRASS-dev] [bug #4868] (grass) r.mapcalc: segfault in 'if then'

Maciej Sieczka tutey at o2.pl
Thu Jul 20 14:40:50 EDT 2006


Glynn Clements napisa?(a):
> 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.

Great, thanks!

Maciek




More information about the grass-dev mailing list