[syslinux] fix crash when installing syslinux on large drives

* The check for minfatsize seems erroneous, and libfat_open()
  errors weren't checked in syslinux.c anyway
* Closes #156
This commit is contained in:
Pete Batard 2013-07-05 22:26:47 +01:00
parent d81ca7de24
commit 0938c56fdc
3 changed files with 13 additions and 6 deletions

View file

@ -92,10 +92,13 @@ libfat_open(int (*readfunc) (intptr_t, void *, size_t, libfat_sector_t),
} else
goto barf; /* Impossibly many clusters */
/* This check doesn't hold for Large FAT32 => remove it */
#if 0
minfatsize = (minfatsize + LIBFAT_SECTOR_SIZE - 1) >> LIBFAT_SECTOR_SHIFT;
if (minfatsize > fatsize)
goto barf; /* The FATs don't fit */
#endif
if (fs->fat_type == FAT28)
fs->rootcluster = read32(&bs->u.fat32.bpb_rootclus);