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

Martin Landa landa.martin at gmail.com
Thu Mar 25 16:45:48 EDT 2010


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 at 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 = &st->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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-commit
>



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


More information about the grass-dev mailing list