Re: don't dereference NULL

2007-10-17 Thread Bruno Haible
Hi Jim, > diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 > ... > +#ifdef __CYGWIN__ > ... > + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; > > That will segfault (dereference NULL) when getenv returns NULL. > Surely that was unintentional... It was intentional. getenv cannot

don't dereference NULL

2007-10-17 Thread Jim Meyering
In http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=92a8f360080d91e9e, there are three additions like this: diff --git a/m4/locale-fr.m4 b/m4/locale-fr.m4 ... +#ifdef __CYGWIN__ ... + if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; That will segfault (dereference NULL)