diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-29 08:37:53 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-29 08:37:53 +0000 |
commit | fae4aa47e171ba097e8a9ac89edcc9d2f81b3c62 (patch) | |
tree | 3b9f1db14e5fde4bedf33791326d03f62499432d /usr.bin/gzsig/verify.c | |
parent | 4dad8e4667226a86bd997bfc895db3040bffb563 (diff) |
fix NULL ptr deref on open fail; ok marius@
Diffstat (limited to 'usr.bin/gzsig/verify.c')
-rw-r--r-- | usr.bin/gzsig/verify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/gzsig/verify.c b/usr.bin/gzsig/verify.c index 756b2bfd3bc..4cd35e3211b 100644 --- a/usr.bin/gzsig/verify.c +++ b/usr.bin/gzsig/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.3 2005/05/29 07:34:34 djm Exp $ */ +/* $OpenBSD: verify.c,v 1.4 2005/05/29 08:37:52 djm Exp $ */ /* * verify.c @@ -197,7 +197,7 @@ verify(int argc, char *argv[]) for (i = 1; i < argc; i++) { gzipfile = argv[i]; - if ((fin = fopen(gzipfile, "r")) < 0) { + if ((fin = fopen(gzipfile, "r")) == NULL) { fprintf(stderr, "Couldn't open %s: %s\n", gzipfile, strerror(errno)); continue; |