summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-22 07:17:31 +0000
committerhpa <hpa>2004-12-22 07:17:31 +0000
commitc151699ef73ae62338abbc44aec8acc2ceb31998 (patch)
tree7f3d221a639067bf3ec3b31ea027076c5df5488b
parent77ab888b7c006189b9e5804184332f57a22925aa (diff)
downloadsyslinux-c151699ef73ae62338abbc44aec8acc2ceb31998.tar.gz
Fix miscompare of FAT32
-rw-r--r--syslxmod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/syslxmod.c b/syslxmod.c
index 8599625a..71079601 100644
--- a/syslxmod.c
+++ b/syslxmod.c
@@ -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;