aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/unzip
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2010-06-09 18:59:07 +0000
committerXin LI <delphij@FreeBSD.org>2010-06-09 18:59:07 +0000
commitd9942426478087eb1f36fea44b9f686724e59102 (patch)
treecb3cd139db40e18787cb0d485fedb368f20779ef /usr.bin/unzip
parentbff23f82e51a4c6014848c22271a42f92c258473 (diff)
downloadsrc-d9942426478087eb1f36fea44b9f686724e59102.tar.gz
src-d9942426478087eb1f36fea44b9f686724e59102.zip
Notes
Diffstat (limited to 'usr.bin/unzip')
-rw-r--r--usr.bin/unzip/unzip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index b80810cb1cce..87927d2bb2e9 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -862,7 +862,9 @@ unzip(const char *fn)
if ((fd = open(fn, O_RDONLY)) < 0)
error("%s", fn);
- a = archive_read_new();
+ if ((a = archive_read_new()) == NULL)
+ error("archive_read_new failed");
+
ac(archive_read_support_format_zip(a));
ac(archive_read_open_fd(a, fd, 8192));