Commit Graph

34 Commits

Author SHA1 Message Date
Pete Batard 8a5a5a318a
[misc] improve readability of error code handling
* Also don't pass a read size value in WriteFileWithRetry() if we don't use it.
2024-04-01 02:16:41 +01:00
Pete Batard 3afa139d7a
[dos] reinstate MS-DOS boot disk creation for Windows 10 and later platforms
* The BlackLotus malware shows that it is possible to download individual
  executables and DLLs straight from Microsoft's symbol servers, so we use
  that capability to download the missing Windows 8.1 'diskcopy.dll', that
  contains the flat floppy disk image with MS-DOS files we need. See:
  https://randomascii.wordpress.com/2013/03/09/symbols-the-microsoft-way/
* Also reorder entries in the "Boot selection" dropdown.
* Also use CreateFileWithTimeout() in GetLogicalName().
2023-05-24 17:55:25 +01:00
Pete Batard 3177e70e25
[misc] fix CodeQL warnings 2023-04-22 16:36:27 +01:00
Pete Batard 42483d23ed
[dos] update FreeDOS to version 1.3
* FreeDOS 1.3 has just been released. Yay! :)
* Closes #1740
* Also addresses 2 warnings reported by Coverity.
2022-02-21 20:02:53 +00:00
Pete Batard 1c2884ceba
[misc] fallback to using LoadLibrary() when LoadLibraryEx() fails or doesn't apply
* Per 2a3e82fa96, it looks like some Windows 7 system have trouble with
  LoadLibraryEx() if they don't have KB2533623 installed (which fixes a MAJOR Windows
  vulnerability. Some people sure want to leave their system open to hackers...).
* Work around this by adding a fallback to LoadLibrary() in GetLibraryHandle()
* Also switch to using GetLibraryHandle() in dos.c and using LoadLibrary() in sections
  where we have the full path (since these calls are not vulnerable).
2021-10-18 13:15:41 +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 4617f91e3b
[misc] introduce hImageOption and ComboBox_GetCurItemData() to simplify code
* Also add retry to ms-sys' write_sectors()
2020-07-17 21:51:15 +01:00
Pete Batard b8579c04da
[misc] add arbitrary buffer allocation to GetResource()
* If duplicate is TRUE and len is non-zero, then a buffer of len size,
  padded with zeroes, is allocated for the resource.
2020-02-19 12:43:05 +00:00
Pete Batard af95de8198
[ui] add experimental optional display of transfer speed and time remaining
* You can use <Alt> to switch modes during an operation that supports it (e.g. Checksum
  computation, DD image writing or zeroing, save to VHD, download, etc.
* IMPORTANT: This is *NOT* available for all operations. Especially, if you were hoping
  to get transfer speed or ETA during ISO or WIM extraction, you *WILL* be disappointed.
* Also harmonize the code in checksum.c
2019-08-20 18:06:07 +01:00
Pete Batard 84427d12dd
[core] add an exception for JMicron flash drives
* Also fix another round of Coverity trigger-happy warnings (Seriously, those FALSE
  POSITIVES about fwprintf can £$%^&* off — fix your frigging detection, Synopsys!)
2019-08-05 20:18:34 +01:00
Pete Batard 90dc847e24 [misc] add static_strcat & static_strcpy and use static_ calls wherever possible
* Also set Rufus next to 2.17 and fix a warning
2017-08-10 19:43:52 +01:00
Pete Batard 2f81e4f177 [core] avoid the use of FILE_SHARE_WRITE
* Not having FILE_SHARE_WRITE on a disk or volume handle helps
  prevent spurious accesses from the OS or other apps while we
  are repartitioning/refomatting.
2017-02-16 14:13:30 +00:00
Pete Batard ee453b0088 [dos] update FreeDOS
* Also capitalize some files to match the FreeDOS archives.
2017-01-13 11:10:52 +00:00
Pete Batard 39d6b90447 [misc] fixes for Clang/C2 compilation support 2016-06-04 17:13:50 +01:00
Pete Batard 250d46e401 [core] use GetTickCount64() always where possible
* Damn you XP!!!
* Also some more code cleanup
2016-02-24 16:10:54 +00:00
Pete Batard c3f47ada06 [misc] add missing.h header
* Also clean up code
2016-02-20 22:52:32 +00:00
Pete Batard f2a539a48c [core] add and use WriteFileWithRetry() where possible 2016-01-14 17:43:02 +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 3ccae1d2e2 disable MS-DOS creation for Windows 10 or later
* Microsoft removed the diskcopy.dll that contained the MS-DOS floppy image
  Not a big loss, since we have FreeDOS... ;)
* Closes #545
* Also apply a long overdue refactoring for boot and target types
* Also update the README to add an icon
2015-07-01 21:26:41 +01:00
Pete Batard f965c5cd23 [misc] fix multiple warnings
* Fix Visual Studio code analysis warnings
* Also rename VS targets to x86_32 and x86_64
2015-01-23 02:26:41 +00:00
Pete Batard d46342c16c [core] ensure AutoMount is enabled while the app is running
* Having AutoMount disabled when a Fixed drive is being used can
  result in a failure during formatting (issue #386).
* Also set explicit FILE_ATTRIBUTE_NORMAL flag an normalize CreateFile usage
* Closes #386
2014-11-11 19:17:39 +00:00
Josh Soref fe3b1eb6f6 [misc] fix spelling mistakes
* Closes #147
2013-06-22 01:15:36 +01:00
Pete Batard c51bf5ce45 [misc] set rufus-next to 1.3.3, update copyright
* update copyright year
* switch relevant files to UTF-8 (without signature).
  It's 2013 for crying out loud:  if your file editor or file viewer
  can't handle plain UTF-8, go back to the 1980s!
* also rename autogen.sh to bootstrap.sh
2013-02-02 15:47:56 +00: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 bba1772940 [misc] refactoring and cleanup - part 1
* add stdfn.c and move the relevant standard calls there
* move most of GetDriveInfo() to drive.c
* rename IDC_DOS/hDos to IDC_BOOT/hBoot
2013-01-24 21:30:11 +00:00
Pete Batard 8ff8b41273 [misc] set rufus-next to 1.3.2
* Also fixed a couple Clang, MSVC Analyzer and MinGW64 warnings
2013-01-20 23:34:13 +00:00
Pete Batard c4cb9d03c1 [misc] fix VS2012 Code Analysis warnings
* Only for files that aren't part of external dependencies
* Also update copyright date
2013-01-09 21:54:28 +00:00
Pete Batard 8506e47fd3 [misc] fix Clang warnings 2012-11-30 00:18:28 +00:00
Pete Batard 98ff7a931a [x64] fix access violation when patching DLL data
* Closes #24
2012-03-28 20:45:49 +01:00
Pete Batard acf7d072b0 [sl] syslinux support (EXPERIMENTAL)
* MS platforms only (*BREAKS* MinGW)
2012-01-12 02:52:40 +00:00
Pete Batard 3187f71933 v1.0.6 (#109)
* removed TODO (duplicates github feature)
* updated copyrights to 2012
* fixed MS only rufus VS2010 solution file
* fixed a Clang warning in SetLGP
2012-01-03 00:50:00 +00:00
Pete Batard 526a125463 [locale] fixed file attributes for FreeDOS locale files
* closes #26
2011-12-25 23:19:02 +00:00
Pete Batard 75e94c1087 [locale] finalized DOS keyboard locale setup
* added FreeDOS support
* closes #3
2011-12-25 22:43:51 +00:00
Pete Batard 64949c27e1 [locale] set DOS keyboard locale (experimental)
* sets DOS locale using the same algorithm as MS' diskcopy.dll
* uses CONFIG.SYS menu to allow US vs non US selection
* only applies to WinME/MS-DOS for now (no FreeDOS)
* also renamed msdos.c -> dos.c with minor improvements
* also added missing FreeDOS credits in about dialog
2011-12-21 00:53:31 +00:00
Renamed from src/msdos.c (Browse further)