X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/0fb669f9d648dfdd7a39478a6b658511455ae966..2cbd078f5153288a39cbf046231a3870df8170cb:/src/files.c?ds=sidebyside diff --git a/src/files.c b/src/files.c index aa65f41f..5a0b2ea4 100644 --- a/src/files.c +++ b/src/files.c @@ -1,6 +1,6 @@ /* Open and close files for Bison. - Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -32,6 +32,7 @@ #include "files.h" #include "getargs.h" #include "gram.h" +#include "stdio-safer.h" /* From basename.c. Almost a lie, as it returns a char *. */ const char *base_name (char const *name); @@ -95,7 +96,7 @@ xfopen (const char *name, const char *mode) { FILE *ptr; - ptr = fopen (name, mode); + ptr = fopen_safer (name, mode); if (!ptr) error (EXIT_FAILURE, get_errno (), _("cannot open file `%s'"), name);