From 3fff9c1441fb00e94c5e7e660a2b9891820891b3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 3 Jul 2005 07:18:21 +0000 Subject: [PATCH] Include stdio--.h. (digest_check): Don't try to read both checksums and data from stdin. --- src/md5sum.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/md5sum.c b/src/md5sum.c index 0fca7aa..e7eac04 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -31,6 +31,7 @@ #include "getline.h" #include "error.h" #include "quote.h" +#include "stdio--.h" /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME (algorithm == ALG_MD5 ? "md5sum" : "sha1sum") @@ -415,6 +416,7 @@ digest_check (const char *checkfile_name, int (*digest_stream) (FILE *, void *)) line[--line_length] = '\0'; if (! (split_3 (line, line_length, &hex_digest, &binary, &filename) + && ! (is_stdin && STREQ (filename, "-")) && hex_digits (hex_digest))) { if (warn) -- 2.7.4