diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-23 00:31:24 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-03-23 00:31:24 +0000 |
commit | ba849485b0e45cc0ffcdd3b78750fefc941fe160 (patch) | |
tree | 4714c777ce0cb31ce5a1c4b59b76886168a02e94 /bin/md5/md5.c | |
parent | f66d1982bffda6796b734b2f7a4978a3e4c883e1 (diff) |
Do not closed stdin; Andrey Matveev
Diffstat (limited to 'bin/md5/md5.c')
-rw-r--r-- | bin/md5/md5.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/md5/md5.c b/bin/md5/md5.c index 9e12e1b29d1..0e68483ae3b 100644 --- a/bin/md5/md5.c +++ b/bin/md5/md5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md5.c,v 1.18 2003/03/13 02:38:22 millert Exp $ */ +/* $OpenBSD: md5.c,v 1.19 2003/03/23 00:31:23 millert Exp $ */ /* * Copyright (c) 2001,2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -312,7 +312,8 @@ digest_filelist(char *file) else (void)printf("(%s) %s: FAILED\n", algorithm, filename); } - (void)fclose(fp); + if (fp != stdin) + fclose(fp); if (!found) warnx("%s: no properly formatted checksum lines found", file); if (lbuf != NULL) |