From 173d01b7c1e9a5d7ba5a6c696a8019061dc41bda Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 1 Jun 2003 17:00:41 +0000 Subject: 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 --- sys/arch/mvmeppc/stand/installboot/installboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/mvmeppc/stand/installboot') diff --git a/sys/arch/mvmeppc/stand/installboot/installboot.c b/sys/arch/mvmeppc/stand/installboot/installboot.c index 813ca3042dc..9f0fc87c189 100644 --- a/sys/arch/mvmeppc/stand/installboot/installboot.c +++ b/sys/arch/mvmeppc/stand/installboot/installboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: installboot.c,v 1.4 2002/03/14 03:15:58 millert Exp $ */ +/* $OpenBSD: installboot.c,v 1.5 2003/06/01 17:00:38 deraadt Exp $ */ /* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */ /* @@ -121,7 +121,7 @@ main(argc, argv) boot = argv[optind]; proto = argv[optind + 1]; dev = argv[optind + 2]; - strcpy(cdev, dev); + strlcpy(cdev, dev, sizeof cdev); cdev[strlen(cdev)-1] = 'c'; if (verbose) { @@ -423,7 +423,7 @@ char *bootproto; pcpul->version = 1; - strcpy(pcpul->vid_id, "M88K"); + memcpy(pcpul->vid_id, "M88K", sizeof pcpul->vid_id); fstat(exe_file, &stat); -- cgit v1.2.3