Commit Graph

50 Commits

Author SHA1 Message Date
Pete Batard e7b66e7e4c
[mingw] use delay loading for DLLs that are subject to side loading
* This reverts much of commits f6ac559f4d and 1947266837
  so that we call the Windows APIs directly again, while ensuring that, by the time we load the DLLs,
  sideloading mitigation has already been applied by the application.
* This is a continuation of #1877, and should help prevent re-introducing side-loading issues when we
  link against new libraries, as well as allow us to drop some of the manual DLL hooking we've been
  doing to prevent it, to clean up the code.
* Note that this is a bit more complex than what the stackoverflow post suggests, because we need to
  create delayloaded libs for both 32-bit and 64-bit, which use a different calling convention and
  therefore need to use different .def files. So there's a lot of gymkhana involved, with Makefiles
  and whatnot, to get us there.
* Also simplify the use of CM_Get_DevNode_Registry_PropertyA() in dev.c since recent versions of
  MinGW now have support for it.
* Also fix 2 small issues in net.c (potential overflow) and format.c (memory leak).
2022-04-12 11:09:59 +01:00
Pete Batard 2a3e82fa96
[misc] switch to using LoadLibraryEx everywhere
* This allows us to further mitigate DLL side loading by enforcing
  LOAD_LIBRARY_SEARCH_SYSTEM32 / LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR.
2021-04-09 11:31:52 +01:00
Pete Batard 9aea069f84
[misc] update autotools support files 2021-03-25 23:57:34 +00:00
Pete Batard 65523bbdf9
[misc] fix 32-bit arithmetic overflow operation warnings
* Also disable C28251 annotation warning
2020-02-12 17:23:23 +00:00
Pete Batard 249beabb86
[internal] silence a MinGW GCC 9.x warning
fs.c:61:25: warning: taking address of packed member of 'struct fat_boot_sector' may result in an unaligned pointer value [-Waddress-of-packed-member]
   61 |     sectorsize = get_16(&sectbuf->bsBytesPerSec);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
2019-06-05 17:08:40 +01:00
Pete Batard f02fbe3acc
[core] add full extraction support for efi.img
* Also, Solus distro maintainers, I hate you!
2019-04-04 19:12:48 +01:00
Pete Batard c5f4e5a2ee [misc] drop Clang support and move VS2017 project files to .vs 2017-11-11 15:41:04 +00:00
Pete Batard 9b5cd92029 [arm] add Visual Studio ARM64 compilation support
* Windows 10 ARM users *WILL* be able to run Rufus natively
  the very same day they got their new device!
2017-11-03 18:04:33 +00:00
Pete Batard 23d71ae0f1 [arm] add ARM compilation support (MSVC)
* Yay!
* Also remove unneeded stdint.h/stdbool.h/inttypes.h
2017-05-15 12:04:03 +01:00
Pete Batard 3d1b3bac40 [misc] update project files to VS2017 2017-05-12 12:08:17 +01:00
Pete Batard ee67019129 [misc] add .editorconfig
* Also update getopt project file to remove missing file
2017-03-14 18:44:14 +01:00
Pete Batard edcfd43ed5 [misc] fix multiple VS Code Analysis warnings 2017-03-10 19:07:48 +01:00
Pete Batard 8a491e9877 [misc] update Clang solution for VS2017 2017-03-09 12:37:53 +01:00
Pete Batard 136fd7a37e [syslinux] fix non release of the volume handle with NTFS
* Closes #904
2017-02-17 11:05:49 +00:00
Pete Batard b204065f88 [clang] use the July Clang/C2 framework VS2015 update 2016-07-21 15:58:11 +01:00
Pete Batard b32c7149eb v2.10 (build 973)
* Also fix an indentation warning from gcc 6.1
2016-07-20 10:51:08 +01:00
Pete Batard e76f60a3e8 [misc] use the more univerasal _mm_alloc() instead of _aligned_malloc()
* Also ensure that our buffers are aligned
* Also remove the use of static buffers in ms-sys
2016-06-10 12:42:43 +01:00
Pete Batard 3fdf622933 [syslinux] fix Syslinux installation for some media
* Some disk devices, such as O2Micro PCI-E SD card readers, return ERROR_INVALID_PARAMETER
  when attempting to use ReadFile() on a volume against a non 8-byte aligned buffer.
* This patch ensures that the Syslinux buffers for sector patching are 16-byte aligned.
* HUGE THANKS to 424778940z, for the numerous testing that allowed to troubleshoot this issue.
* Closes #767
2016-06-09 17:49:58 +01:00
Pete Batard 3b0c4e8083 add Clang/C2 support for Visual Studio (EXPERIMENTAL)
* When I say EXPERIMENTAL, I mean it!!
* Currently, opening an ISO9660 image fails with 'Could not access directory'
2016-06-04 18:57:55 +01:00
Pete Batard f0b13361be [msvc] harmonize compilation options 2016-06-04 17:50:16 +01:00
Pete Batard 1a24e5bbd7 [syslinux] fix a typo that reintroduced a possible crash
* a10a207790 reintroduced the crash that was fixed in ad68ccfac9
  due to the missing semicolon.
* Also fix a minor output message issue
* Closes #752
2016-05-16 16:33:53 +01:00
Pete Batard a10a207790 [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
2016-03-08 17:28:45 +00:00
Pete Batard b9caf8b605 [core] fix computation of FAT size for Large FAT32
* Ridgecropt's GetFATSizeSectors() computation was incorrect
  and resulted in data sectors being "wasted" (unaddressable)
* See: http://www.syslinux.org/archives/2016-February/024850.html
* Also revert the minfatsize check of Syslinux, since it no longer fails.
2016-02-26 13:26:34 +00:00
Pete Batard d20eb9262b [misc] fix MinGW compilation
* Makefile was missing from previous patch
2016-02-24 14:35:51 +00:00
Pete Batard db0880e534 [syslinux] update Syslinux to better align with its official source
* This means disabling some warnings and removing explicit casts, but so be it...
* Also fix the minfatsize check for Large FAT32
2016-02-23 20:52:06 +00:00
Pete Batard ad68ccfac9 [syslinux] fix a crash if the downloaded Syslinux content has been modified
* Some stupid corporate firewalls will return garbage content for ldlinux.bss/ldlinux.sys
  instead of a 403 (as they really should), which creates an issue with the code written
  by the Syslinux people, as they forgot to check for potential overflows...
2015-10-28 23:17:55 +00:00
Pete Batard 5004374277 [misc] update to VS2015 and fix VS code analysis issues
* Also update Bled to latest, as well as build scripts
* Note: Considering that Visual Studio 2015 is both freely and legally
  available for anyone who wants to use it to compile Rufus, starting
  with this commit, I will NOT be supporting any other version of Visual
  Studio but 2015.
2015-08-10 23:30:23 +01:00
Pete Batard 0e59b86abc [ui] fix dropdown being populated on ISO selection when no device is present
* Also remove unneeded code in libfat.h
* Also set rufus-next to 2.3
2015-06-06 23:13:39 +01:00
Pete Batard 9e7b0bad89 [syslinux] add support for 4K sector size
* Also add 4K sector size support in ms-sys
2015-06-02 21:47:44 +01:00
Pete Batard 80406bac08 v2.0 (build 639)
* Also fix a Syslinux/MinGW warning
2015-03-03 21:32:41 +00:00
Pete Batard 785150dcb2 [core] fix "Requesting Disk Access" issue with Syslinux/NTFS
* See http://reboot.pro/topic/17902-rufus-v130-has-been-released/?p=190958
* Also fix non continuation of format operation after Syslinux has been downloaded
* Also fix missing Syslinux installation for ReactOS
2015-02-26 00:15:13 +00:00
Pete Batard cf7e52e051 [misc] pocketful of enhancement and fixes - part 4
* Fix disappearance of "Start" button when selecting an ISO with
  no target (reported by Sopor)
* Add commented sample ini file
* Add AC_PROG_AR macro in configure.ac
* Update ChangeLog for BETA
2015-02-10 22:45:48 +00:00
Pete Batard e72d6546d1 [misc] update MinGW build chain for msys2
* Use autoconf and automake 1.14
* reinstate parallel build flags
* Also fix MinGW warnings and errors
2014-12-15 18:42:21 +00:00
Pete Batard 4c8b022042 [internal] enable ALPHA/BETA from configure
* Pass --enable-alpha or --enable-beta to configure/_release.sh
2014-11-28 00:22:57 +00:00
Pete Batard ca5a9dde5f [misc] upgrade solution files for Visual Studio 2013 Community Edition
* Visual Studio 2013 is now free for Open Source developers, so make
  it our default.
* See http://www.visualstudio.com/news/vs2013-community-vs
2014-11-13 11:04:37 +00:00
Pete Batard 6ca024ae3b [syslinux] update Syslinux to v6.03
* Also add experimental support for Syslinux/NTFS
* Closes #391
2014-11-11 19:54:05 +00:00
Pete Batard 299506056a [syslinux] fix support for recent Syslinux versions
* Detect Syslinux version from isolinux.bin (Closes #272)
* Download required Syslinux v5+ files where needed (Closes #165)
* Also fix an issue where using a Syslinux based ISO didn't switch to ISO mode
* Also alter DownloadFile and ExtractISOFile to return a size
2014-01-21 21:59:09 +00:00
Pete Batard c544429606 [loc] use a single rufus.loc as translator base
* Remove the need to maintain a new_translation.loc
* Add a sed invocation to remove comments and unwanted stuff
  to generate a final embedded.loc
* Note: sed is only invoked for MinGW.
  MS compilers still embed the unmodified rufus.loc.
* Also fix a small bug when parsing the version.
2013-11-01 21:53:48 +00:00
Pete Batard e661eff9ae [syslinux] silence a MinGW warning in libfat
* Also fix a typo in ChangeLog.txt
2013-07-18 00:10:29 +01:00
Pete Batard 0938c56fdc [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
2013-07-05 22:26:47 +01:00
Josh Soref fe3b1eb6f6 [misc] fix spelling mistakes
* Closes #147
2013-06-22 01:15:36 +01:00
Pete Batard 647d9f18ad [misc] refactoring and cleanup - part 2
* add GetResource() function call to handle resource loading and
  revert 98ff7a931a
* add separate BootCheck() call
* better handling of passes tooltip
* remove superfluous backslashes
* fix standalone EFI support
* add GPL v3 license file and update README.txt
2013-01-25 01:56:28 +00:00
Pete Batard ae43dfd721 [misc] switch to VS2012 2013-01-07 01:50:51 +00:00
Pete Batard a352ad019d [sl] update to syslinux 4.06
* Also fixes MSVC 64 bit warnings in format.c and iso.c
2012-11-04 00:29:24 +00:00
Pete Batard 51fb4e339f [freedos] Embed FreeDOS always in a single version of rufus.c
* also bump version to rufus-next
* also change build prefix from '#' to 'b' in tags
2012-03-28 19:50:21 +01:00
Pete Batard 36be65ed23 [iso] add support for isolinux/syslinux ISO images
* use a modified syslinux that can use isolinux config files
* update syslinux to git version
* remove embedding of chain.c32 for the time being
2012-02-14 01:23:42 +00:00
Pete Batard 013db6a6d8 [msvc] update solution files and add missing config.h 2012-01-31 17:39:54 +00:00
Pete Batard 5bd86bc743 [iso] initial ISO image support (EXPERIMENTAL)
* from libcdio: http://www.gnu.org/software/libcdio/
2012-01-31 01:40:22 +00:00
Pete Batard b6252a913a [sl] syslinux support (MinGW)
* also fixes memory leak in syslinux.c
* closes #31
2012-01-12 11:05:09 +00:00
Pete Batard acf7d072b0 [sl] syslinux support (EXPERIMENTAL)
* MS platforms only (*BREAKS* MinGW)
2012-01-12 02:52:40 +00:00