[GRASS-dev] Re: [GRASS GIS] #1430: Buffer overrun in vector/diglib dig__fread_port_L with big-endian negative values on LP64 systems

GRASS GIS trac at osgeo.org
Wed Aug 31 04:14:27 EDT 2011


#1430: Buffer overrun in vector/diglib dig__fread_port_L with big-endian negative
values on LP64 systems
---------------------------------------------+------------------------------
 Reporter:  rroliver                         |       Owner:  grass-dev@…              
     Type:  defect                           |      Status:  new                      
 Priority:  normal                           |   Milestone:                           
Component:  Vector                           |     Version:  svn-trunk                
 Keywords:  diglib portable LP64 big-endian  |    Platform:  Unspecified              
      Cpu:  All                              |  
---------------------------------------------+------------------------------

Comment(by mmetz):

 Replying to [ticket:1430 rroliver]:
 > The code in dig!__fread_port_L is broken for handling big endian
 negative numbers on systems where sizeof(long) != PORT_LONG.
 >
 > Presently the code fails to negate the value and will write 4 bytes past
 the end of the buffer.
 >
 > Problem exists for all grass versions through to trunk...
 >
 The patch seems to make sense but there are more subtle bugs in
 lib/diglib/portable.c related to big endian systems. Can you test grass7
 (trunk)? I have applied your patch plus some more modifications in trunk
 in r47992. After testing, they can be backported to 6.5. and 6.4.2.

 Markus M

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



More information about the grass-dev mailing list