#1974: buffer overflow in v.to.rast
---------------------+------------------------------------------------------
Reporter: mgeeves | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.3
Component: Vector | Version: 6.4.2
Keywords: | Platform: All
Cpu: All |
---------------------+------------------------------------------------------
The issue in bug #800 is also present in v.to.rast, long names which are >
the 80 char RECORD_LEN causes a buffer overflow when writing history
#1974: buffer overflow in v.to.rast
-----------------------+----------------------------------------------------
Reporter: mgeeves | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.3
Component: Vector | Version: 6.4.2
Keywords: v.to.rast | Platform: All
Cpu: All |
-----------------------+----------------------------------------------------
Comment(by hamish):
I works for me on debian, 6.4.2, 6.4.3svn, and 6.5svn. Also tested
6.4.3svn on ubuntu 12.04 LTS.
Can you try building 6.4.3rc3? there were a number of overflow bugs fixed
in v.to.rast since 6.4.2 to do with labels, which are now fixed. it could
have been something related to that.
> Hopefully I've not done something daft elsewhere!
a buffer overflow is pretty much always the programmer's fault.
#1974: buffer overflow in v.to.rast
-----------------------+----------------------------------------------------
Reporter: mgeeves | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.3
Component: Vector | Version: 6.4.2
Keywords: v.to.rast | Platform: All
Cpu: All |
-----------------------+----------------------------------------------------
Comment(by mgeeves):
Hi Hamish,
Odd, I'm still seeing the same problem in grass-6.4.3RC3. Re being daft I
mostly meant having old bits from previous SVN builds conflicting. To rule
that out I've tried building another vm with vmbuilder (defaults apart
from adding in a few bits like the sshd and deb-src repos), then an
{{{
apt-get build-dep grass
}}}
and building from grass-6.4.3RC3.tar.gz with:
{{{
./configure --with-proj-share=/usr/share/proj --with-tcltk-
includes=/usr/include/tcl8.5
}}}
Installing using checkinstall with defaults
Same result, buffer overrun!
Note the raster is actually generated and displays ok, it just displays
the overflow error and doesn't record to hist
After changing the code in support.c to use G_snprintf, it doesn't error
for me any more..
#1974: buffer overflow in v.to.rast
-----------------------+----------------------------------------------------
Reporter: mgeeves | Owner: grass-dev@…
Type: defect | Status: new
Priority: minor | Milestone: 6.4.3
Component: Vector | Version: 6.4.2
Keywords: v.to.rast | Platform: All
Cpu: All |
-----------------------+----------------------------------------------------
Comment(by hamish):
ok, I could reproduce it in a package build after making the name a bit
longer, I guess the unoptimized 'gcc -g' in my source build was zeroing
all memory or so, shrug.
fixed in devbr6 in r56254. please everyone test so it can be applied to
6.4svn in time for the release.