[GRASS-dev] Re: [GRASS-SVN] r41496 - grass/trunk/lib/gis

Hi,

it seems to be that this commit re-introduced the bug which I tried to
fixed in r41447. Now

$ db.connect

Program received signal SIGSEGV, Segmentation fault.
0xb7fa27a3 in G_recreate_command () at parser.c:2857
2857 if (opt->answer != '\0' && opt->answers[0] != NULL) {

Martin

2010/3/20 <svn_grass@osgeo.org>:

Author: huhabla
Date: 2010-03-20 13:48:17 -0400 (Sat, 20 Mar 2010)
New Revision: 41496

Modified:
grass/trunk/lib/gis/parser.c
Log:
Fixed segfault which appears while automated gui creation

Modified: grass/trunk/lib/gis/parser.c

--- grass/trunk/lib/gis/parser.c 2010-03-20 17:29:12 UTC (rev 41495)
+++ grass/trunk/lib/gis/parser.c 2010-03-20 17:48:17 UTC (rev 41496)
@@ -631,7 +631,7 @@

opt = &amp;st\-&gt;first\_option;
while \(opt\) \{

- if (opt->answer && opt->answers[0]) {
+ if (opt->answer && opt->answers && opt->answers[0]) {
slen = strlen(opt->key) + strlen(opt->answers[0]) + 4; /* +4 for: ' ' = " " */
if (len + slen >= nalloced) {
nalloced += (nalloced + 1024 > len + slen) ? 1024 : slen + 1;

_______________________________________________
grass-commit mailing list
grass-commit@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-commit

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

2010/3/25 Martin Landa <landa.martin@gmail.com>:

it seems to be that this commit re-introduced the bug which I tried to
fixed in r41447. Now

ops, I mixed up grass70 and grass65...

$ db.connect

Program received signal SIGSEGV, Segmentation fault.
0xb7fa27a3 in G_recreate_command () at parser.c:2857
2857 if (opt->answer != '\0' && opt->answers[0] != NULL) {

fixed in r41539.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa