[syslinux] fallback to embedded on version match if download fails

* Could be useful for current tails user (6.03 based, same as ours)
  who want to create an UFD without downloading files.
* Also improve the buffer overflow check in syslinux/libinstaller/syslxmod.c
This commit is contained in:
Pete Batard 2016-03-08 17:28:45 +00:00
parent 1cc7fca4c5
commit a10a207790
3 changed files with 17 additions and 12 deletions

View file

@ -1468,8 +1468,13 @@ static BOOL BootCheck(void)
}
}
if (syslinux_ldlinux_len[i] == 0) {
uprintf("Could not download the file - cancelling\n");
return FALSE;
// If the version matches our embedded one, try to use that as a last ditch effort
if (img_report.sl_version == embedded_sl_version[1]) {
uprintf("Could not download the file - will try to use embedded %s version instead", img_report.sl_version_str);
} else {
uprintf("Could not download the file - cancelling\n");
return FALSE;
}
}
}
}