>
> There is a bug in libgii that causes programs to SIGSEGV, when there is
> no HOME environment variable.
>
> Problem is in function ggGetUserDir().
>
> Here is one possible fix:
>
> diff -c libgii-0.8.1/gg/misc.c libgii-0.8.1.new/gg/misc.c
> *** libgii-0.8.1/gg/misc.c Sun Aug 26 17:57:18 2001
> --- libgii-0.8.1.new/gg/misc.c Tue Sep 10 10:25:52 2002
> ***************
> *** 52,57 ****
> --- 52,59 ----
> int len;
>
> ptr = getenv("HOME");
> + if ( !ptr )
> + ptr = "/";
> len = strlen(ptr);
> if (len + APPENDLEN > PATH_MAX) return NULL;
>
Ah, great! You found a long outstanding NULL pointer bug!
The question is what to do then. Some possibilities:
- Should we fail with an error?
- Which default path should we use (i.e. /tmp, /)?
- Should we print out a warning or not, when using a default path?
--
CU,
Christoph Egger
E-Mail: [EMAIL PROTECTED]
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net