#970: r.report seg faults on small page width values
------------------------------------------------------+---------------------
Reporter: epatton | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: minor | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Keywords: r.report, page width, segmentation fault | Platform: Linux
Cpu: x86-64 |
------------------------------------------------------+---------------------
r.report seg faults when passed small values of page width values. From
the NC test dataset, the elevation raster creates the seg fault on 23
characters, and an infinite loop with 24 characters:
{{{
r.report -h map=elevation pw=23
100%
+---------------------+
|Category Information |
| #|description |
|---------------------|
|104.966573-105.361675|from to �
'@�?@�h0�h��h`�h@�h�����'�Yc4@/�~F�'@4@���V
Al
A@k#A�K#A�?�����Segmentation fault
}}}
gdb backtrace:
{{{
gdb -q r.report
Reading symbols from /usr/local/grass-6.5.svn/bin/r.report...done.
(gdb) run map=elevation pw=23
# lots of binary gibberish printed, then:
Program received signal SIGSEGV, Segmentation fault.
print_label (s=0x629000 <Address 0x629000 out of bounds>, len=<value
optimized out>, pflag=1, spacing=0, dot=<value optimized out>) at
label.c:46
46 putchar(*s);
(gdb)
}}}
~ Eric.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/970>
GRASS GIS <http://grass.osgeo.org>