[GRASS5] r.support

Brad Douglas rez at touchofmadness.com
Fri Apr 15 12:58:30 EDT 2005


On Fri, 2005-04-15 at 10:36 +0200, Markus Neteler wrote:
> On Thu, Apr 14, 2005 at 09:22:57PM -0700, Brad Douglas wrote:
> ...
> > Let me know if you are still having trouble.  I believe it's a null
> > dereference in G__find_file().  I just pointed a pointer to it, which
> > should stop the segfault.
> > 
> > I've tried it again and again with all option combinations and I still
> > fail to crash.  Odd.
> 
> It still crashed, but I have applied this fix to CVS:
> 
> front.c:
>      /* Parse command-line options */
> -    if (G_parser(argc, argv)) {
> -        G_warning(_("Unable to parse arguments."));
> -        G_usage();
> -    }
> +    if (G_parser(argc,argv))
> +        exit(1);
> 
> I remember darkly that G_usage() should not be used any more.
> The old code was from 5.x...

G_usage() is depreciated?  Even so, the above changes should not fix the
module.

Did G_parser() somehow succeed without command-line arguments before
this patch was applied (and why for you and not for me?)?  That would
explain how G__find_file() was segfaulting on a null pointer
dereference.

This is very strange.


-- 
Brad Douglas <rez at touchofmadness.com>




More information about the grass-dev mailing list