diff options
Diffstat (limited to 'sys/arch/mvme68k/stand/wrtvid/wrtvid.c')
-rw-r--r-- | sys/arch/mvme68k/stand/wrtvid/wrtvid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c index fe4f65d9efd..e9b4b98f230 100644 --- a/sys/arch/mvme68k/stand/wrtvid/wrtvid.c +++ b/sys/arch/mvme68k/stand/wrtvid/wrtvid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wrtvid.c,v 1.3 1996/04/28 10:49:49 deraadt Exp $ */ +/* $OpenBSD: wrtvid.c,v 1.4 2003/06/01 17:00:37 deraadt Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -35,15 +35,15 @@ main(argc, argv) perror(filename); exit(2); } - sprintf(fileext, "%c%cboot", filename[4], filename[5]); + snprintf(fileext, sizeof fileext, "%c%cboot", filename[4], filename[5]); tape_vid = open(fileext, O_WRONLY|O_CREAT|O_TRUNC, 0644); - sprintf(fileext, "boot%c%c", filename[4], filename[5]); + snprintf(fileext, sizeof fileext, "boot%c%c", filename[4], filename[5]); tape_exe = open(fileext, O_WRONLY|O_CREAT|O_TRUNC,0644); pcpul = (struct cpu_disklabel *)malloc(sizeof(struct cpu_disklabel)); bzero(pcpul, sizeof(struct cpu_disklabel)); - strcpy(pcpul->vid_id, "NBSD"); + memcpy(pcpul->vid_id, "NBSD", sizeof pcpul->vid_id); fstat(exe_file, &stat); /* size in 256 byte blocks round up after a.out header removed */ |