aboutsummaryrefslogtreecommitdiffstats
path: root/dos
diff options
context:
space:
mode:
Diffstat (limited to 'dos')
-rw-r--r--dos/syslinux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c
index d83cadc8..9574553d 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -701,7 +701,8 @@ int main(int argc, char *argv[])
* this is supposed to be a simple, privileged version
* of the installer.
*/
- ldlinux_sectors = (syslinux_ldlinux_len + SECTOR_SIZE - 1) >> SECTOR_SHIFT;
+ ldlinux_sectors = (syslinux_ldlinux_len + 2 * ADV_SIZE
+ + SECTOR_SIZE - 1) >> SECTOR_SHIFT;
sectors = calloc(ldlinux_sectors, sizeof *sectors);
lock_device(2);
fs = libfat_open(libfat_xpread, dev_fd);