[GRASS-dev] Re: [GRASS GIS] #800: r.random and r.reclass - buffer overflow on long mapset/map names

GRASS GIS trac at osgeo.org
Thu Jul 1 08:07:13 EDT 2010


#800: r.random and r.reclass - buffer overflow on long mapset/map names
--------------------------+-------------------------------------------------
 Reporter:  ferrouswheel  |       Owner:  grass-dev@…              
     Type:  defect        |      Status:  new                      
 Priority:  normal        |   Milestone:  6.5.0                    
Component:  Raster        |     Version:  svn-develbranch6         
 Keywords:                |    Platform:  All                      
      Cpu:  All           |  
--------------------------+-------------------------------------------------

Comment(by glynn):

 Replying to [comment:6 neteler]:

 > > snprintf() isn't in C89; if you want to use it, you need to add a
 configure check, and provide an alternate in case it isn't available.
 >
 > We do have G_snprintf() in lib/gis/snprintf.c which is a "private"
 implementation.
 > Should that be used instead?

 Yes. Although vsnprintf() isn't guaranteed to exist, so far no-one has
 complained about GRASS failing to build, which suggests that platforms
 lacking vsnprintf() are uncommon.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/800#comment:7>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list