--- ./lib/streq.h 2014-03-17 20:07:07.100011157 +0100 +++ ./lib/streq.h 2014-03-17 20:08:07.092260617 +0100 @@ -171,7 +171,7 @@ streq0 (const char *s1, const char *s2, #else #define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ - (strcmp (s1, s2) == 0) + (s1 && s2 && strcmp (s1, s2) == 0) #endif --- ./lib/fnmatch.c 2014-03-17 20:03:43.579188629 +0100 +++ ./lib/fnmatch.c 2014-03-17 20:03:03.171029833 +0100 @@ -91,7 +91,7 @@ extern int fnmatch (const char *pattern, # define isblank(c) ((c) == ' ' || (c) == '\t') # endif -# define STREQ(s1, s2) (strcmp (s1, s2) == 0) +# define STREQ(s1, s2) (s1 && s2 && strcmp (s1, s2) == 0) # if defined _LIBC || WIDE_CHAR_SUPPORT /* The GNU C library provides support for user-defined character classes --- ./lib/setenv.c 2014-03-17 20:04:55.179473733 +0100 +++ ./lib/setenv.c 2014-03-17 20:04:31.535379075 +0100 @@ -353,7 +353,7 @@ weak_alias (__clearenv, clearenv) #if HAVE_SETENV # undef setenv -# define STREQ(a, b) (strcmp (a, b) == 0) +# define STREQ(a, b) (a && b && strcmp (a, b) == 0) int rpl_setenv (const char *name, const char *value, int replace) --- ./lib/fts.c 2014-03-17 20:05:04.187509939 +0100 +++ ./lib/fts.c 2014-03-17 20:05:28.979609945 +0100 @@ -214,7 +214,7 @@ static int fts_safe_changedir (FTS #endif #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) -#define STREQ(a, b) (strcmp (a, b) == 0) +#define STREQ(a, b) (a && b && strcmp (a, b) == 0) #define CLR(opt) (sp->fts_options &= ~(opt)) #define ISSET(opt) (sp->fts_options & (opt)) --- ./lib/hash-triple.c 2014-03-17 20:05:47.479684932 +0100 +++ ./lib/hash-triple.c 2014-03-17 20:06:16.243802131 +0100 @@ -27,7 +27,7 @@ #include "same.h" #include "same-inode.h" -#define STREQ(a, b) (strcmp (a, b) == 0) +#define STREQ(a, b) (a && b && strcmp (a, b) == 0) /* Hash an F_triple, and *do* consider the file name. */ size_t --- ./src/system.h 2014-03-17 20:01:56.934772813 +0100 +++ ./src/system.h 2014-03-17 20:02:19.542860075 +0100 @@ -252,7 +252,7 @@ select_plural (uintmax_t n) return (n <= ULONG_MAX ? n : n % PLURAL_REDUCER + PLURAL_REDUCER); } -#define STREQ(a, b) (strcmp (a, b) == 0) +#define STREQ(a, b) (a && b && strcmp (a, b) == 0) #if !HAVE_DECL_GETLOGIN char *getlogin ();