diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-04-06 03:02:45 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-04-06 03:02:45 +0000 |
commit | 8fea19bc2c0fc1c5cf2c6e45177ffd1ca7c92517 (patch) | |
tree | 1c9542a2e075429f5f803751b5ce426c9b5486f5 /sys/arch/mvme88k | |
parent | 3d0f8ae22e810aef00073168f02cfe53c32996e8 (diff) |
The disklabel fields d_packname and d_typename are not null terminated strings
and should not be created or used as such.
This fixes some instances of both behaviours, and sets the stage for some
strcpy -> strncpy fixup.
ok tdeval@ millert@ deraadt@
Diffstat (limited to 'sys/arch/mvme88k')
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 3cd0fe76fb2..3786c5fee6e 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.17 2002/03/14 01:26:40 millert Exp $ */ +/* $OpenBSD: disksubr.c,v 1.18 2003/04/06 03:02:44 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -740,7 +740,7 @@ printlp(lp, str) printf("%s\n", str); printf("magic1 %x\n", lp->d_magic); printf("magic2 %x\n", lp->d_magic2); - printf("typename %s\n", lp->d_typename); + printf("typename %.*s\n", (int)sizeof(lp->d_typename), lp->d_typename); printf("secsize %x nsect %x ntrack %x ncylinders %x\n", lp->d_secsize, lp->d_nsectors, lp->d_ntracks, lp->d_ncylinders); printf("Num partitions %x\n", lp->d_npartitions); |