Opened 12 years ago

Closed 8 years ago

#1705 closed defect (fixed)

i.group segfaults on empty input

Reported by: neteler Owned by: grass-dev@…
Priority: minor Milestone: 7.0.5
Component: Imagery Version: svn-trunk
Keywords: i.group Cc:
CPU: x86-64 Platform: Linux

Description

When running i.group with *empty* input (as it can happen from an unsuccessful g.mlist call piped into it), it segfaults:

i.group group=tmean_avg input=""
Segmentation fault (core dumped)

The real call was:

i.group group=tmean_avg input=`g.mlist rast pat="tmean.1981_2010.??.avg sep=,"`
Segmentation fault (core dumped)

but g.mlist did not return anything due to a typo in the map name pattern.

GDB (line broken for readability):

(gdb) run group=tmean_0_25deg_1981_2010_avg \
  input=`g.mlist rast pat="tmean_0_25deg.1981_2010.??.avg sep=,"`

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bb2ee6 in G_name_is_fully_qualified \
(fullname=0x0, name=0x7fffffffd410 "", mapset=0x7fffffffd310 "") 
at nme_in_mps.c:45

Change History (4)

comment:1 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:2 by martinl, 8 years ago

In 69227:

i.group segfaults on empty input (see #1705)

comment:3 by martinl, 8 years ago

In 69228:

i.group segfaults on empty input (see #1705) (merge r69227 from trunk)

comment:4 by martinl, 8 years ago

Resolution: fixed
Status: newclosed

In 69229:

i.group segfaults on empty input (fix #1705) (merge r69227 from trunk)

Note: See TracTickets for help on using tickets.