summaryrefslogtreecommitdiffstats
path: root/text-utils/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils/display.c')
-rw-r--r--text-utils/display.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/text-utils/display.c b/text-utils/display.c
index 717565ed1..1f9a11b4c 100644
--- a/text-utils/display.c
+++ b/text-utils/display.c
@@ -42,6 +42,7 @@
#include "hexdump.h"
#include "xalloc.h"
#include "c.h"
+#include "nls.h"
static void doskip(const char *, int);
static u_char *get(void);
@@ -257,6 +258,10 @@ get(void)
eaddress = address + nread;
return(curp);
}
+ if (fileno(stdin) == -1) {
+ warnx(_("all input file arguments failed"));
+ return(NULL);
+ }
n = fread((char *)curp + nread, sizeof(unsigned char),
length == -1 ? need : min(length, need), stdin);
if (!n) {