summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sum.c b/src/sum.c
index 67527e142..62fd30e92 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -40,6 +40,7 @@ static int bsd_sum_file ();
static int sysv_sum_file ();
void error ();
+int safe_read ();
/* The name this program was run with. */
char *program_name;
@@ -242,7 +243,7 @@ sysv_sum_file (file, print_name)
}
}
- while ((bytes_read = read (fd, buf, sizeof buf)) > 0)
+ while ((bytes_read = safe_read (fd, buf, sizeof buf)) > 0)
{
register int i;