diff options
author | 1996-11-24 18:15:59 +0000 | |
---|---|---|
committer | 1996-11-24 18:15:59 +0000 | |
commit | e5c22bbaf03838e027da5e1a0478b27e51765901 (patch) | |
tree | 60fe1306a29bb3074691aabac6ada59b66fbf4f0 | |
parent | Fix typo (diff) | |
download | wireguard-openbsd-e5c22bbaf03838e027da5e1a0478b27e51765901.tar.xz wireguard-openbsd-e5c22bbaf03838e027da5e1a0478b27e51765901.zip |
Fix core dump if -xz and archive does not exist (doh!)
-rw-r--r-- | bin/pax/ar_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pax/ar_io.c b/bin/pax/ar_io.c index 5dff4b18752..3573f7c021b 100644 --- a/bin/pax/ar_io.c +++ b/bin/pax/ar_io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar_io.c,v 1.6 1996/10/27 00:29:40 millert Exp $ */ +/* $OpenBSD: ar_io.c,v 1.7 1996/11/24 18:15:59 millert Exp $ */ /* $NetBSD: ar_io.c,v 1.5 1996/03/26 23:54:13 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: ar_io.c,v 1.6 1996/10/27 00:29:40 millert Exp $"; +static char rcsid[] = "$OpenBSD: ar_io.c,v 1.7 1996/11/24 18:15:59 millert Exp $"; #endif #endif /* not lint */ @@ -139,7 +139,7 @@ ar_open(name) syswarn(0, errno, "Failed open to read on %s", name); if (zflag == GZIP_CMP) { gzf = gzdopen(arfd, "r"); - if (!gz_iszipped(gzf)) { + if (gzf && !gz_iszipped(gzf)) { (void)lseek(arfd, 0, SEEK_SET); zflag = COMPRESS_CMP; } |