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/dev/ofw/ofdisk.c | |
parent | 0f64621783b3f46a4851826b9f4284e3c9dbeb61 (diff) |
strcat/strcpy/sprintf cleanup. krw@, anil@ ok. art@ tested sparc64.
Diffstat (limited to 'sys/dev/ofw/ofdisk.c')
-rw-r--r-- | sys/dev/ofw/ofdisk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c index 8b67daf84d9..489766c9dbe 100644 --- a/sys/dev/ofw/ofdisk.c +++ b/sys/dev/ofw/ofdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofdisk.c,v 1.6 2002/05/24 13:31:11 art Exp $ */ +/* $OpenBSD: ofdisk.c,v 1.7 2003/04/06 18:54:20 ho Exp $ */ /* $NetBSD: ofdisk.c,v 1.3 1996/10/13 01:38:13 christos Exp $ */ /* @@ -100,7 +100,7 @@ ofdattach(parent, self, aux) of->sc_ihandle = 0; of->sc_dk.dk_driver = &ofdkdriver; of->sc_dk.dk_name = of->sc_name; - strcpy(of->sc_name, of->sc_dev.dv_xname); + strlcpy(of->sc_name, of->sc_dev.dv_xname, sizeof of->sc_name); disk_attach(&of->sc_dk); dk_establish(&of->sc_dk, self); /* XXX */ printf("\n"); @@ -145,7 +145,7 @@ ofdopen(dev, flags, fmt, p) path[l] = 0; } - strcat(path, ":0"); + strlcat(path, ":0", sizeof path); if (!(of->sc_ihandle = OF_open(path))) return ENXIO; |