summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1998-12-16 03:04:10 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1998-12-16 03:04:10 +0000
commit00c82d965fba2c7de54f3dac76a8789dbfb27035 (patch)
tree3271d8374fea18f3cf30b37d4d065d0a8a23c9e6 /sys/arch/i386/stand
parent6a26f4e5665aafb119a6c982696504a62aa2d328 (diff)
cast multipliers in boot record byte offset calculation to
off_t to avoid overflow for partitions starting at high cylinders. spotted and tested by WHS <wouters@cistron.nl>, 10x!
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/installboot/installboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/installboot/installboot.c b/sys/arch/i386/stand/installboot/installboot.c
index 2c9c110a7e4..f84790ef35a 100644
--- a/sys/arch/i386/stand/installboot/installboot.c
+++ b/sys/arch/i386/stand/installboot/installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: installboot.c,v 1.32 1998/04/25 18:32:35 millert Exp $ */
+/* $OpenBSD: installboot.c,v 1.33 1998/12/16 03:04:09 mickey Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -224,7 +224,7 @@ main(argc, argv)
/* Find OpenBSD partition. */
for (dp = mbr.dmbr_parts; dp < &mbr.dmbr_parts[NDOSPART]; dp++) {
if (dp->dp_size && dp->dp_typ == DOSPTYP_OPENBSD) {
- startoff = dp->dp_start * dl.d_secsize;
+ startoff = (off_t)dp->dp_start * dl.d_secsize;
fprintf(stderr, "using MBR partition %d: "
"type %d (0x%02x) offset %d (0x%x)\n",
dp - mbr.dmbr_parts,