mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-17 08:34:27 -04:00
[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:
parent
d81ca7de24
commit
0938c56fdc
3 changed files with 13 additions and 6 deletions
|
@ -146,7 +146,7 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
|||
/* Reopen the volume (we already have a lock) */
|
||||
d_handle = GetLogicalHandle(drive_index, TRUE, FALSE);
|
||||
if (d_handle == INVALID_HANDLE_VALUE) {
|
||||
uprintf("Could open volume for syslinux operation\n");
|
||||
uprintf("Could open volume for Syslinux installation\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,10 @@ BOOL InstallSyslinux(DWORD drive_index, char drive_letter)
|
|||
if (sectors == NULL)
|
||||
goto out;
|
||||
fs = libfat_open(libfat_readfile, (intptr_t) d_handle);
|
||||
if (fs == NULL) {
|
||||
uprintf("FAT access error\n");
|
||||
goto out;
|
||||
}
|
||||
ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL);
|
||||
secp = sectors;
|
||||
nsectors = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue