[GRASS-dev] [GRASS GIS] #1808: g.remove WXGUI interface causes buffer overflow in g.findfile

#1808: g.remove WXGUI interface causes buffer overflow in g.findfile
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Keywords: | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
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 :slight_smile:
  * 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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1808&gt;
GRASS GIS <http://grass.osgeo.org>

#1808: g.remove WXGUI interface causes buffer overflow in g.findfile
---------------------+------------------------------------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords:
  Platform: Linux | Cpu: Unspecified
---------------------+------------------------------------------------------
Changes (by annakrat):

  * status: new => closed
  * resolution: => fixed

Comment:

Should be fixed according to #2091.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1808#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>