summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2004-09-07 09:41:43 +0000
committermiod <miod@openbsd.org>2004-09-07 09:41:43 +0000
commit42094e77a97e428b34b705965bcee61dfabf7fb2 (patch)
treedd346c41a821182709ce83c31051b1abb868290b
parentset the xflags; form netbsd; millert@ deraadt@ otto@ ok (diff)
downloadwireguard-openbsd-42094e77a97e428b34b705965bcee61dfabf7fb2.tar.xz
wireguard-openbsd-42094e77a97e428b34b705965bcee61dfabf7fb2.zip
Do not incorrectly sign-extend a mode_t value.
ok deraadt@
-rw-r--r--usr.bin/ar/extract.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ar/extract.c b/usr.bin/ar/extract.c
index d4ca22c8da8..81aa3a404a2 100644
--- a/usr.bin/ar/extract.c
+++ b/usr.bin/ar/extract.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extract.c,v 1.6 2003/06/12 20:58:08 deraadt Exp $ */
+/* $OpenBSD: extract.c,v 1.7 2004/09/07 09:41:43 miod Exp $ */
/* $NetBSD: extract.c,v 1.5 1995/03/26 03:27:53 glass Exp $ */
/*-
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)extract.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: extract.c,v 1.6 2003/06/12 20:58:08 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: extract.c,v 1.7 2004/09/07 09:41:43 miod Exp $";
#endif
#endif /* not lint */
@@ -116,7 +116,7 @@ extract(char **argv)
cf.wname = file;
copy_ar(&cf, chdr.size);
- if (fchmod(tfd, (short)chdr.mode)) {
+ if (fchmod(tfd, (mode_t)chdr.mode)) {
warn("chmod: %s", file);
eval = 1;
}