diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-04-06 18:54:21 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-04-06 18:54:21 +0000 |
commit | 51ab7e02d9e6e7c9950f34bc0cc7cc72bb53bd12 (patch) | |
tree | 749f8097655f1aa27f2d7a4a1ecdad5e155781a5 /sys/arch/mvme88k | |
parent | 0f64621783b3f46a4851826b9f4284e3c9dbeb61 (diff) |
strcat/strcpy/sprintf cleanup. krw@, anil@ ok. art@ tested sparc64.
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/autoconf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c index 735d8e84b77..cb75e7887a1 100644 --- a/sys/arch/mvme88k/mvme88k/autoconf.c +++ b/sys/arch/mvme88k/mvme88k/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.20 2002/03/14 01:26:39 millert Exp $ */ +/* $OpenBSD: autoconf.c,v 1.21 2003/04/06 18:54:19 ho Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -243,7 +243,7 @@ setroot() printf(": "); len = getsb(buf, sizeof(buf)); if (len == 0 && bootdv != NULL) { - strcpy(buf, bootdv->dv_xname); + strlcpy(buf, bootdv->dv_xname, sizeof buf); len = strlen(buf); } if (len > 0 && buf[len - 1] == '*') { @@ -397,13 +397,13 @@ getdevunit(name, unit) int lunit; /* compute length of name and decimal expansion of unit number */ - sprintf(num, "%d", unit); + snprintf(num, sizeof num, "%d", unit); lunit = strlen(num); if (strlen(name) + lunit >= sizeof(fullname) - 1) panic("config_attach: device name too long"); - strcpy(fullname, name); - strcat(fullname, num); + strlcpy(fullname, name, sizeof fullname); + strlcat(fullname, num, sizeof fullname); while (strcmp(dev->dv_xname, fullname) != 0) { if ((dev = dev->dv_list.tqe_next) == NULL) |