diff options
author | hpa <hpa> | 2004-12-22 07:17:31 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-12-22 07:17:31 +0000 |
commit | c151699ef73ae62338abbc44aec8acc2ceb31998 (patch) | |
tree | 7f3d221a639067bf3ec3b31ea027076c5df5488b | |
parent | 77ab888b7c006189b9e5804184332f57a22925aa (diff) | |
download | syslinux-c151699ef73ae62338abbc44aec8acc2ceb31998.tar.gz |
Fix miscompare of FAT32
-rw-r--r-- | syslxmod.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -201,10 +201,10 @@ const char *syslinux_check_bootsect(const void *bs) if ( get_8(sectbuf+bs16BootSignature) == 0x29 ) { if ( !memcmp(sectbuf+bs16FileSysType, "FAT12 ", 8) ) { - if ( clusters >= 4085 ) + if ( clusters >= 0xFF5 ) return "more than 4084 clusters but claims FAT12"; } else if ( !memcmp(sectbuf+bs16FileSysType, "FAT16 ", 8) ) { - if ( clusters < 4085 ) + if ( clusters < 0xFF5 ) return "less than 4084 clusters but claims FAT16"; } else if ( memcmp(sectbuf+bs16FileSysType, "FAT ", 8) ) { static char fserr[] = "filesystem type \"????????\" not supported"; @@ -216,7 +216,7 @@ const char *syslinux_check_bootsect(const void *bs) /* FAT32 */ /* Moving the FileSysType and BootSignature was a lovely stroke of M$ idiocy */ if ( get_8(sectbuf+bs32BootSignature) != 0x29 || - !memcmp(sectbuf+bs32FileSysType, "FAT32 ", 8) ) + memcmp(sectbuf+bs32FileSysType, "FAT32 ", 8) ) goto invalid; } else { goto invalid; |