diff options
author | jhb <jhb@FreeBSD.org> | 2000-07-21 18:26:20 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-07-21 18:26:20 +0000 |
commit | 02577b66359fd932511fde36508eb7da55a09746 (patch) | |
tree | 434946f5809159fd790bdd7be9a5e3c952bd7dfb /sbin/fdisk | |
parent | 4b5414bf8369baa394fef53f0e5c72d5ea1d1d24 (diff) | |
download | FreeBSD-src-02577b66359fd932511fde36508eb7da55a09746.zip FreeBSD-src-02577b66359fd932511fde36508eb7da55a09746.tar.gz |
Fix a really stupid bug where I assumed sizeof(int) == 2. This resulted in
MBR's with a 4th slice failing the signature check and fdisk saying that
they are invalid.
Submitted by: bde
Diffstat (limited to 'sbin/fdisk')
-rw-r--r-- | sbin/fdisk/fdisk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 723db8d..ae339aa 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -794,7 +794,7 @@ read_s0() warnx("can't read fdisk partition table"); return -1; } - if (*(int *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) { + if (*(uint16_t *)&mboot.bootinst[MBRSIGOFF] != BOOT_MAGIC) { warnx("invalid fdisk partition table found"); /* So should we initialize things */ return -1; |