Commit Graph

70 Commits

Author SHA1 Message Date
Pete Batard 45423becd5
[vhd] fix VHDX being inadvertently saved as VHD
* Addresses the error reported in #2468.
* Also use memmove instead of memcpy where overlapping data is involved.
2024-05-12 13:06:23 +01:00
Pete Batard 513c5f44a5
[misc] fix possible buffer overflows in _snprintf()
* _snprintf() is not always guaranteed to NUL terminate a string which could
  lead to  buffer overflows in iso_extract_files() and iso_extract_files().
* Fix this by switching to using the more secure _snprintf_s().
* Vulnerability discovered and reported by Mansour Gashasbi (@gashasbi).
* For good measure, we also switch to the strncat_s() where possible and also
  use memmove() instead of memcpy()/strcpy() as the behaviour of the latter on
  overlapping memory regions is undefined.
* Also fix some additional MinGW warnings regarding casts and nb_blocks.
2024-04-17 17:19:03 +01:00
Pete Batard 7eb9a6f16b
[misc] fix some benign Coverity warnings 2023-06-18 19:09:15 +02:00
Pete Batard 3a0f7d3813
[iso] attempt to fix the clusterfuck of GRUB 2.06 incompatible versions
* As was *ENTIRELY PREDICTIBLE*, the lack of timely releases from the GRUB
  project has resulted in distro maintainers (Ubuntu, Fedora, etc.) taking
  matters in their own hand and applying patches on top of their 2.06 version.
  However, these patches result in 2.06 bootloaders that are incompatible
  with 2.06 modules that don't have the same patches applied. Especially this
  now results in the infamous "452: out of range pointer" error message when
  using patched modules with unpatched bootloader or unpatched modules with
  patched bootloaders.
* Making this issue worse, we also have distro maintainers who won't add a
  suffix to their GRUB version, AS ONE SHOULD DO WHEN ONE APPLIES TONS OF
  PATCHES ON TOP OF A PROJECT'S SOURCE, and MISreport their non 2.06 GRUB as
  "2.06", and, because we can't detect what patches are needed from modules
  themselves (unlike what is the case for grub_debug_is_enabled), we have no
  way of telling incompatible GRUB 2.06 binaries from one another.
* As a result, we have no choice but to append a sanitized version of the ISO
  label to the GRUB version, as a means to differentiate between incompatible
  versions, and tweak our existing bootloader download mechanism to *ATTEMPT*
  to download a compatible 'core.img' from our server... where we will have
  to waste a lot of time adding new binaries and symlinks to try to make all
  these GRUB "2.06" based images work, and will probably miss quite few with
  the end results that users who are just trying to install Linux will be left
  stranded.
* Again, I have to point out how the end result of regular users wanting to
  try Linux and being unable to do so is the *DIRECT* result of the GRUB project
  maintainers having sat on a 2-year influx of CONTINUOUS patches, and thinking
  that "Release Early, Release Often" is only a gimmick, and not something that
  should apply to their project, even as they have been warned before, by yours
  truly, that *NOT* releasing on a timely basis is causing actual grievances...
  That's because, had the GRUB maintainers released on a timely basis (at least
  once a year) Fedora and Ubuntu would be using vanilla GRUB 2.07 with the memory
  patches, and we wouldn't be trying to mix that with old GRUB 2.06 binaries.
* For more on this, see #2233, noting that we will need to apply a compatibility
  breaking change during the 4.1 release, to revert the patches we applied to
  the default 2.06 'core.img' in pbatard/rufus-web@320b800592.
2023-05-16 14:05:28 +01:00
Pete Batard 1e51385bed
[misc] revert to using the OS arch rather than app arch for the update download
* This means that someone running Rufus x64 or ARM64 should be
  proposed Rufus ARM64 rather than Rufus x64 as an upgrade.
* Also switch the BETA channel from x86 to x64.
* Also remove the _chdirU(app_dir) when using -i in commandline.
2023-04-24 20:50:53 +01:00
Pete Batard 3177e70e25
[misc] fix CodeQL warnings 2023-04-22 16:36:27 +01:00
Pete Batard 6280e8020a
[net] fix incorrect architectures when querying for updates 2023-04-16 19:47:54 +01:00
Pete Batard a0d669232c
[ui] add a new selection dialog for Windows 11 setup customization
* This moves the extended Windows 11 options (bypass TPM & Secure Boot) away from
  "Image options" into a new explicit dialog, along with supplementary customization
  such as enabling offline account (for Windows 11 22H2) and skipping all data
  collection questions.
* This customization is now enacted through an unattend.xml file rather than offline
  registry manipulation, so that this *should* also work with the Windows Store version.
* Also update arch detection and rework/reorganize upcoming translation changes.
* Note: The 'Remove "unsupported hardware" desktop watermark' option is *UNTESTED*.
2022-06-23 13:34:24 +01:00
Pete Batard c28f9bc491
[misc] fix PVS-Studio warnings 2022-01-05 12:57:26 +01:00
Dimitri Papadopoulos d840083a32
[misc] fix typos found by codespell
* 3rd party software was left out.
* Most changes are in code comments, but one user-visible string has also been fixed.
* Closes #1817
2021-11-16 18:53:52 +00:00
Pete Batard 2761c72187
[parser] fix unwanted removal of lines that don't match a token
* In replace_in_token_data() when looking for lines starting with a specific
  token but finding lines containing a larger version of the token (e.g. looking
  for 'linux' but finding 'linux16') we would forget to output the non matching
  line as we rejected it.
* This produced issues such as the one described at:
  https://ubuntuforums.org/showthread.php?t=2465291&page=10&p=14052629#post14052629
* Fix this by ensuring that we always output the lines that we reject.
2021-09-20 16:11:47 +01:00
Pete Batard 8538ce0590
[misc] fix some Coverity warnings 2021-08-02 13:22:49 +01:00
Pete Batard c8078b0119
[misc] fix Coverity warnings
* Also re-instate the _coverity.cmd script and try to fix AppVeyor Coverity uploads
2020-06-19 10:53:40 +01:00
Pete Batard 68d42d4153
[iso] remove Ubuntu's splash screen for persistent drives
* This is accomplished by removing the 'maybe-ubiquity' option
* UEFI only
2020-06-11 13:52:14 +01:00
Pete Batard 590b89a56a
[parser] add multiple occurrence support to replace_in_token_data()
* Closes #1333
2020-03-23 17:49:40 +00:00
Tsarevich Dmitry 121257c584
[misc] fix PVS-Studio static analyzer warnings
* Surround macro params to ensure expected results
* Fix copy-paste errors
* Fix a potential buffer overflow in SetSectionHeaders()
* Add const modifier where relevant
* Use GetWindowLongPtr() everywhere
* Use proper sprintf format for unsigned int
* Use %s for printf-like funcs (https://www.viva64.com/en/w/v618/print/)
* Closes #1464
2020-02-28 17:08:11 +00:00
Pete Batard 4c816a519e
[misc] update license URLs and align ms-sys's write_data buffer to 4K
* Also remove some obsolete TODOs
2019-09-06 11:32:37 +01:00
Pete Batard 1fa0aaf325
[iso] relax isolinux cfg file detection for persistence and force DD mode for Pop_OS 2019-08-15 21:14:30 +01:00
Pete Batard 4c8dd29935
[misc] silence more Coverity false positives
* "Show me static analysis framework that only triples my work and I will kiss its feet."
2019-08-06 17:02:28 +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 fcb15ab6e9
[ext2fs] automated persistence set up for Debian Live & Ubuntu
* Only UEFI boot for now (GRUB) & requires a post 2019.07.26 ISO for Ubuntu.
* This adds the relevant persistence/persistent kernel option to the conf file, sets the
  expected volume label and creates a /persistence.conf file where needed.
* Also improve token parsing by ensuring a token is followed by at least one white space.
2019-08-02 17:57:10 +01:00
Pete Batard 0c368b4e69
[loc] finalize translations for 3.5
* Also update for latest Fido and simplify SetLGP
2019-03-12 19:53:25 +00:00
Pete Batard 6109d91c38 [net] add automated update support for ARM/ARM64 2018-10-22 17:42:40 +01:00
Pete Batard 0fa19d7019 [internal] reorganize localization resources 2018-07-16 16:38:40 +01:00
Pete Batard f9275e4780 [loc] update the processing of version numbers
* Now only use major.minor for version references
* Drop the use of LOC_FRAMEWORK_VERSION. We'll use custom handling if we ever need a framework change.
* Also update/fix some of the UI elements for persistent partition
* Also reposition the language selection menu when we don't have a large number of them
2018-07-15 01:05:05 +01:00
Pete Batard 63eb747cde [iso] make the lookup for updatable .cfg file more generic
* For ESET and other ISOs, such as Arch derivatives
* Closes #1013
2017-11-01 12:30:29 +00:00
Pete Batard 9464ae94a4 [pki] more ASN.1 parser improvements 2017-09-05 22:21:34 +01:00
Pete Batard 94e4c0905b [pki] improve ASN.1 parser
* Enable search from OIDs expressed as strings and ignore non UNIVERSAL classes
2017-09-04 14:32:56 +01:00
Pete Batard 35da381a11 [pki] check timestamp chronology during update validation
* Done to address the second "vulnerability" proposed in #1009, independently
  of the protocol used.
2017-09-02 15:27:56 +01:00
Pete Batard be1bdb7c85 [misc] miscellaneous cleanup
* Also add CreateWindowExU() method
* Also add the 'DisableFileIndexing' to the ini template
2017-04-04 17:26:45 +01:00
Pete Batard edcfd43ed5 [misc] fix multiple VS Code Analysis warnings 2017-03-10 19:07:48 +01:00
Pete Batard 7d302d340f [togo] enable selection of Windows version
* Closes #847
* Also set rufus-next to 2.12
2016-12-13 14:26:27 +00:00
Pete Batard a10ea1498b [misc] add more check for malloc() errors
* Closes #772
* With thanks to @elfring
2016-06-07 19:47:01 +01:00
Pete Batard c3f47ada06 [misc] add missing.h header
* Also clean up code
2016-02-20 22:52:32 +00:00
Pete Batard 140236acd6 [loc] display a note in the log when a translation is behind
* Also make sure the messages regarding language pack availability
  are visible to the users in the log
* Also fix a typo in the Malay translation
2016-02-15 12:50:06 +00:00
Pete Batard 65bbe984fd [loc] remove nagging about lost translators
* All things considered, this was probably more detrimental than helpful
* Reverts 26af32b522
2016-02-05 13:14:22 +00:00
Pete Batard ab6f0ef0bb [iso] fix Fedora UEFI support
* One of the ANNOYING distros that relies on an extended label to
  find the install media and is now doing that for Grub/EFI.
* Closes #547
2015-08-13 23:31:12 +01:00
Pete Batard 1c322aba56 [misc] drop the micro from the version
* Closes #439
2015-02-08 22:59:09 +00:00
Pete Batard 26af32b522 [loc] add random request for translator help where needed
* This will randomly produce a message for users of a translation that
  hasn't been updated in a while requesting help and pointing them to:
  http://rufus.akeo.ie/translate
* Closes #435
* Also fix a WDK compilation issue with strtoll
2015-02-03 23:42:27 +00:00
Pete Batard 17872dc1de [core] add INI file/portable support
* Application will start in portable mode if its name contains a 'p'
  eg. "rufus_portable.exe" or "prufus.exe"
* Closes #264
* Also fix a couple smaller issues
2015-01-25 00:58:06 +00:00
Pete Batard 55a5eb07e7 [iso] fix handling of label-based ISOs
* Linux has a MAJOR quirk in that labels such as "Contains Space"
  get converted to "/dev/disk/by-label/Contains\x20Space".
* While Rufus already had smart label Syslinux handling (by replacing
  the ones found in isolinux.cfg to their more limited FAT32 version)
  there was absolutely NO WAY of guessing this quirk until ISOs
  such as Red Hat 7 or CentOS 7 started to use spaces in their ISO
  labels and people reported breakage!
* This commit also fixes an issue where psz_fullpath was modified when
  it shouldn't, which broke Debian 7.7.0, and most likely any ISO
  containing a subdirectory in the directory where a syslinux/isolinux
  config file is located.
* Closes #396
* Closes #394
* Closes #388
* Closes #380
2014-11-07 23:57:17 +00:00
Pete Batard 8da527e16e [misc] minor pre-release fixes
* mention KolibriOS in the license
* duprintf usage improvements
2014-06-03 22:16:40 +01:00
Pete Batard c0d3f8e57c [core] fix VHD support
* Also fix various typos
2014-05-20 19:28:46 +01:00
Pete Batard 266599e6fd [misc] fix various Coverity issues
* update DLL load/unload
* fix resources not being freed and potentially unsafe calls
* add extra checks
2014-05-10 22:20:22 +01:00
Pete Batard 8ae158ba22 [loc] add support for right-to-left languages
* Closes #192
2014-01-24 02:46:06 +00:00
Pete Batard 14fbbfaa2e [efi] zero the MBR when MBR/UEFI is used
* This ensures that an MBR/UEFI UFD can only ever be booted in EFI mode
* Also fix an issue where the same drive was not properly detected ("U:" vs "U:\")
* Also update ReactOS copyright and fix a warning from Cppcheck in parser.c
2014-01-11 00:19:03 +00:00
Pete Batard b4e5a148ce [misc] minor improvements to the About dialog
* Bigger dialog, larger font, etc.
* Also fix a MinGW warning in parser.c
2014-01-03 01:26:38 +00:00
Pete Batard 0f02284164 [loc] fix crash when two Rufus applications are running
* Closes #261
* Also remove the need for a separate get_loc_data_file call to
  initialize the en-US messages
* Also fix a possible issue with setLGP
2013-12-28 16:48:02 +00:00
Pete Batard 24e73c5e10 [efi] set UEFI mode when a pure EFI ISO is selected
* Closes #168
* Also fix various VS Code Analysis warnings
2013-12-22 20:48:57 +00:00
Pete Batard 63e1fe3d55 [loc] persits the user-selected locale
* ...since it seems this is what most Rufus users want.
* Also fix a typo in the Malay translation (reported by hyxer)
* Closes #250
2013-12-22 18:28:38 +00:00