summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
commit173d01b7c1e9a5d7ba5a6c696a8019061dc41bda (patch)
tree8c8b7bb08108dca24afcee3bbe301e8ba6f76e81 /sys/arch/i386
parent3e42965de9054a39afc4957c4f099218e709ae51 (diff)
strcpy/strcat/sprintf removal in all bootblocks. various testing by
various people. outside of some messy things in src/gnu, only one thing in the main tree now violates this rule: bind
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/libsa/Makefile6
-rw-r--r--sys/arch/i386/stand/libsa/dev_i386.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile
index a40af3711b4..22d48c315ed 100644
--- a/sys/arch/i386/stand/libsa/Makefile
+++ b/sys/arch/i386/stand/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.40 2003/04/17 03:43:18 drahn Exp $
+# $OpenBSD: Makefile,v 1.41 2003/06/01 17:00:35 deraadt Exp $
.include "${.CURDIR}/../Makefile.inc"
@@ -28,8 +28,8 @@ CLEANFILES+= unixdev.o unixsys.o nullfs.o
# stand routines
SRCS+= alloc.c exit.c getfile.c gets.c globals.c strcmp.c strlen.c \
- strncmp.c memcmp.c memcpy.c memset.c printf.c strerror.c strncpy.c \
- strtol.c ctime.c
+ strncmp.c memcmp.c memcpy.c memset.c printf.c snprintf.c \
+ strerror.c strncpy.c strtol.c ctime.c strlcpy.c strlcat.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c fstat.c ioctl.c lseek.c \
diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c
index 86817886fcc..8389c3a26e8 100644
--- a/sys/arch/i386/stand/libsa/dev_i386.c
+++ b/sys/arch/i386/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.24 2001/09/11 06:06:15 fgsch Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.25 2003/06/01 17:00:35 deraadt Exp $ */
/*
* Copyright (c) 1996-1999 Michael Shalayeff
@@ -167,7 +167,8 @@ char *
ttyname(fd)
int fd;
{
- sprintf(ttyname_buf, "%s%d", cdevs[major(cn_tab->cn_dev)],
+ snprintf(ttyname_buf, sizeof ttyname_buf, "%s%d",
+ cdevs[major(cn_tab->cn_dev)],
minor(cn_tab->cn_dev));
return (ttyname_buf);
}