Opened 12 years ago

Closed 11 years ago

#1808 closed defect (fixed)

g.remove WXGUI interface causes buffer overflow in g.findfile

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: wxGUI Version: unspecified
Keywords: Cc:
CPU: Unspecified Platform: Linux

Description

Steps to reproduce:

  • launch g.remove and select a lot of raster maps from list. In my case it resulted in 280 symbol long comma separated list for rast= parameter.
  • RUN :)
  • Copy command and run from CLI just fine without any problems.
*** buffer overflow detected ***: g.findfile terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7f9ace1c38d7]
/lib64/libc.so.6(+0xfe6f0)[0x7f9ace1c16f0]
g.findfile(main+0x1c9)[0x4011c9]
/lib64/libc.so.6(__libc_start_main+0xed)[0x7f9ace0e791d]
g.findfile[0x401479]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:05 11976808                           /home/maris/soft/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/g.findfile
00601000-00602000 r--p 00001000 08:05 11976808                           /home/maris/soft/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/g.findfile
00602000-00603000 rw-p 00002000 08:05 11976808                           /home/maris/soft/grass_trunk/dist.x86_64-unknown-linux-gnu/bin/g.findfile
01821000-01842000 rw-p 00000000 00:00 0                                  [heap]
Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_core/forms.py", line 679, in
OnRun

ret = self.goutput.RunCmd(cmd, onDone = self.OnDone)
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_core/goutput.py", line 595,
in RunCmd

task = GUI(show = None).ParseCommand(command)
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_core/forms.py", line 2146, in
ParseCommand

mapset = grass.find_file(value, element)['mapset']
KeyError
:
'mapset'

My GRASS version could be like r53972

Change History (1)

comment:1 by annakrat, 11 years ago

Resolution: fixed
Status: newclosed

Should be fixed according to #2091.

Note: See TracTickets for help on using tickets.