* lib/freopen.c (rpl_freopen): Don't compare the filename if it is
NULL.
+2011-08-31 Claudio Bley <claudio.bley@gmail.com> (tiny change)
+
+ freopen: Don't crash if the filename argument is NULL.
+ * lib/freopen.c (rpl_freopen): Don't compare the filename if it is
+ NULL.
+
2011-08-30 Paul Eggert <eggert@cs.ucla.edu>
openat: work around AIX 7.1 fstatat bug
rpl_freopen (const char *filename, const char *mode, FILE *stream)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
- if (strcmp (filename, "/dev/null") == 0)
+ if (filename != NULL && strcmp (filename, "/dev/null") == 0)
filename = "NUL";
#endif