diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2003-04-27 11:22:55 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2003-04-27 11:22:55 +0000 |
commit | c670c56d6bb9915caf18009083d3515283a25fe1 (patch) | |
tree | ffee78ad4ad468acbebd70d511be258d28fdbd52 /sys/dev/ic/cac.c | |
parent | c9c7d16545b1bfad4519f491aa113a57ab7c7b2d (diff) |
strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.
Diffstat (limited to 'sys/dev/ic/cac.c')
-rw-r--r-- | sys/dev/ic/cac.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index 026f7edd719..c6d178698d5 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.13 2003/03/15 19:16:10 deraadt Exp $ */ +/* $OpenBSD: cac.c,v 1.14 2003/04/27 11:22:52 ho Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -620,7 +620,7 @@ cac_scsi_cmd(xs) inq.version = 2; inq.response_format = 2; inq.additional_length = 32; - strcpy(inq.vendor, "Compaq "); + strlcpy(inq.vendor, "Compaq ", sizeof inq.vendor); switch (CAC_GET1(dinfo->mirror)) { case 0: p = "RAID0"; break; case 1: p = "RAID4"; break; @@ -628,8 +628,9 @@ cac_scsi_cmd(xs) case 3: p = "RAID5"; break; default:p = "<UNK>"; break; } - sprintf(inq.product, "%s volume #%02d", p, target); - strcpy(inq.revision, " "); + snprintf(inq.product, sizeof inq.product, "%s volume #%02d", + p, target); + strlcpy(inq.revision, " ", sizeof inq.revision); cac_copy_internal_data(xs, &inq, sizeof inq); break; |