summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-04-11 20:12:17 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-04-11 20:12:17 +0000
commit857b9db0e0fffd8e18c30bd090cac63eaa253214 (patch)
tree13d98f141a5722419f32571793633c35f05dc5a7 /src/tee.c
parent99eb6d3a02a3425a1a0a7e1d6c42ae4234e7bea9 (diff)
downloadcoreutils-857b9db0e0fffd8e18c30bd090cac63eaa253214.tar.xz
Include stdio-safer.h.
(tee): Use fopen_safer.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tee.c b/src/tee.c
index 209dbc03e..3392f65f4 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -1,5 +1,5 @@
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 85,1990-2004 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
#include "system.h"
#include "error.h"
+#include "stdio-safer.h"
/* The official name of this program (e.g., no `g' prefix). */
#define PROGRAM_NAME "tee"
@@ -161,7 +162,7 @@ tee (int nfiles, const char **files)
{
descriptors[i] = (STREQ (files[i], "-")
? stdout
- : fopen (files[i], mode_string));
+ : fopen_safer (files[i], mode_string));
if (descriptors[i] == NULL)
{
error (0, errno, "%s", files[i]);