From: Toni Wilen Date: Sun, 11 Oct 2020 17:16:03 +0000 (+0300) Subject: Do not mount executable as a bootable disk image if it has disk image extension or... X-Git-Tag: 4900~286 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=97e8202a9c929603e89b5e671de53d34af556625;p=francis%2Fwinuae.git Do not mount executable as a bootable disk image if it has disk image extension or is too large. --- diff --git a/disk.cpp b/disk.cpp index 870707bb..3b31b695 100644 --- a/disk.cpp +++ b/disk.cpp @@ -1276,7 +1276,7 @@ static int drive_insert (drive * drv, struct uae_prefs *p, int dnum, const TCHAR offs += tid->len; } - } else if (memcmp (exeheader, buffer, sizeof exeheader) == 0) { + } else if (memcmp (exeheader, buffer, sizeof exeheader) == 0 && size <= 512 * (1760 - 7) && !canauto) { int i; struct zfile *z = zfile_fopen_empty (NULL, _T(""), 512 * 1760); createimagefromexe (drv->diskfile, z);