diff options
Diffstat (limited to 'usr.bin/tsort')
-rw-r--r-- | usr.bin/tsort/tsort.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index e82841d7e85..ca9c6fcd9a6 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsort.c,v 1.32 2015/10/11 23:01:32 espie Exp $ */ +/* $OpenBSD: tsort.c,v 1.33 2015/12/04 17:58:05 espie Exp $ */ /* ex:ts=8 sw=4: * * Copyright (c) 1999-2004 Marc Espie <espie@openbsd.org> @@ -386,6 +386,8 @@ read_hints(FILE *f, struct ohash *h, int quiet, const char *name, str = e; } } + if (!feof(f)) + err(EX_IOERR, "error reading %s", name); return order; } |