summaryrefslogtreecommitdiff
path: root/sys/arch/vax
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-13 02:42:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-02-13 02:42:21 +0000
commite9faada323e879900c5085eab213797e9172741d (patch)
tree871a2c58cb9a7e54fe3e587188517d76b865e27c /sys/arch/vax
parente457e30afb3587bb172e78a73ac7a82356a88b06 (diff)
use strncpy instead of strcpy (no strcpy in libsa); hugh ok
Diffstat (limited to 'sys/arch/vax')
-rw-r--r--sys/arch/vax/boot/boot/boot.c5
-rw-r--r--sys/arch/vax/stand/boot/boot.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/vax/boot/boot/boot.c b/sys/arch/vax/boot/boot/boot.c
index 2dec2e6fb0f..5b18de3404f 100644
--- a/sys/arch/vax/boot/boot/boot.c
+++ b/sys/arch/vax/boot/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.8 2001/10/04 00:21:09 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.9 2002/02/13 02:42:20 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.4 1999/10/23 14:42:22 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -256,7 +256,8 @@ loadpcs()
i = cp - line + 1;
} else
i = 0;
- strcpy(pcs + i, "pcs750.bin");
+ strncpy(pcs + i, "pcs750.bin", sizeof(pcs) - i - 1);
+ pcs[sizeof(pcs)-1] = '\0';
i = open(pcs, 0);
if (i < 0) {
printf("bad luck - missing pcs750.bin :-(\n");
diff --git a/sys/arch/vax/stand/boot/boot.c b/sys/arch/vax/stand/boot/boot.c
index 2dec2e6fb0f..5b18de3404f 100644
--- a/sys/arch/vax/stand/boot/boot.c
+++ b/sys/arch/vax/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.8 2001/10/04 00:21:09 miod Exp $ */
+/* $OpenBSD: boot.c,v 1.9 2002/02/13 02:42:20 deraadt Exp $ */
/* $NetBSD: boot.c,v 1.4 1999/10/23 14:42:22 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -256,7 +256,8 @@ loadpcs()
i = cp - line + 1;
} else
i = 0;
- strcpy(pcs + i, "pcs750.bin");
+ strncpy(pcs + i, "pcs750.bin", sizeof(pcs) - i - 1);
+ pcs[sizeof(pcs)-1] = '\0';
i = open(pcs, 0);
if (i < 0) {
printf("bad luck - missing pcs750.bin :-(\n");