Commit Graph

76 Commits

Author SHA1 Message Date
Pete Batard 2106be0c3b
[iso] fix an assertion with mt86plus_7.00_64.grub.iso
* Also fix a couple typos in Brazilian Portuguese translation.
2024-05-06 19:39:26 +01:00
Pete Batard 8a8e418751
[iso] fix a buffer overflow in iso9660/iso9660_fs.c
* Whereas the length of the buffer allocated for the UTF-8 filename string is
  the same length as the UCS-2 (which means it can store twice as many UTF-8
  bytes as there are characters in the filename), it is still possible for the
  converted UTF-8 string to overflow this buffer if the name contains glyphs
  that use 3 or 4-byte sequences.
* As a result, use strncpy with the actual size of the UTF-8 filename buffer
  (the following bytes are calloc'd to zero so the truncated string will be
  NUL terminated) and produce a warning if the filename is truncated.
* Vulnerability discovered and reported by Mansour Gashasbi (@gashasbi).
2024-04-09 00:09:21 +02:00
Pete Batard c2b2624b62
[vhd] improve handing of user selected filename on save to VHD/FFU
* Use of '*.*' as pattern in file save dialog could lead to assert and crash, so
  we now try to derive the type of image to be saved from the file extension. We
  also did not properly handle user cancellation in the file save dialog.
* Also update iso9660/iso9660_fs.c to latest proposal of El Torito image handling.
* Also add a couple asserts in the hash table functions so that, if these ever get
  triggered we will pick them from Windows Store reports, and clean up code.
2024-02-03 18:39:44 +00:00
Pete Batard 018ed3414b
[iso] improve El Torito image handling
* Update to latest libcdio proposal and fix incorrect image size.
* Also remove unnecessary calls in packme.cmd.
2024-01-24 17:51:40 +00:00
Pete Batard ae6732c07b
[iso] add basic El-Torito image parsing to libcdio
* Based on El-Torito specs found at https://pdos.csail.mit.edu/6.828/2014/readings/boot-cdrom.pdf.
* Follows 7-zip's virtual '[BOOT]/#...' naming conventions (though we don't check for the full name).
* Limited to 8 NoEmul images.
2024-01-16 17:21:32 +00:00
Pete Batard e524e81e99
[iso] improve Rock Ridge CE handling 2023-03-23 14:47:53 +00:00
Pete Batard cb561e7176
[iso] fix libcio processing of Rock Ridge CE fields
* Boy do you not want to use chars in struct iso_su_ce_s as
  from_733() will sign extend the bytes and you will end up
  with an offset like 0xffffffc4 instead of 0x000000c4...
* Addresses the leftover from 6c44dccc10.
* Also some headers clean up and pick up latest libcdio changes.
2023-02-28 18:27:21 +00:00
Thomas Schmitt ae377ae8ca
[iso] fix support for multi-extent files when Joliet is in use
* See https://lists.gnu.org/archive/html/libcdio-devel/2022-06/msg00000.html
* This partially fixes ISO mode support for Gentoo Live, though, since the Gentoo
  maintainers appear not to have a kernel NTFS driver in the current images, the
  installer still fails to mount the installation media.
2022-06-27 20:42:41 +01:00
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 c28f9bc491
[misc] fix PVS-Studio warnings 2022-01-05 12:57:26 +01:00
Pete Batard 366ce99712
[misc] fix Coverity and CodeQL warnings
* Also make sure to build Release for static analysis.
2021-09-07 23:39:04 +01:00
Pete Batard 9aea069f84
[misc] update autotools support files 2021-03-25 23:57:34 +00:00
Pete Batard 09fb7cd9b4
[iso] update libcdio to latest 2020-06-17 19:24:57 +01:00
Pete Batard 77d319267f
[iso] add Rock Ridge deep directory support
* Closes #1526
2020-06-02 11:13:47 +01:00
Pete Batard dcc4463273
[iso] update libcdio to latest 2020-05-24 21:09:28 +01: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
David Stumph 3c9acb0d3c
[misc] use $(srcdir) in Makefiles
* Picked from #1449
2020-02-10 12:08:04 +00:00
Pete Batard 4ebed1eac2
[iso] report usage of UDF symbolic links
* These may dramatically increase the size required for extraction
  so users may want to have some hints about these.
* Closes #1446
2020-02-05 13:23:49 +00:00
Pete Batard 6275c5b724 fix MinGW-w64 warnings 2018-09-03 13:41:29 +01:00
Pete Batard b80f7c0785 [iso] update libcdio to latest
* Also clean up some of the code in iso.c
2018-06-04 12:20:14 +01:00
Pete Batard add0e156df [iso] better fix for processing of openSUSE Leap ISOs
* From the discussion on the libcdio mailing list, and simplified
  since the only archs we support are little-endian.
2018-05-27 21:46:34 +01:00
Pete Batard 31d1b396c7 [iso] fix processing of openSUSE Leap ISOs
* Looks like the openSUSE people are abusing the ISO9660 file system,
  and libcdio should be a bit more relaxed about it.
  So we alter libcdio to be more chill...
* Also relax the annoying 'from_733: broken byte order' messages
* Closes #1136
2018-05-26 14:40:52 +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 44c9cb0b82 [iso] add support for ISO9660 multiextent files
* Closes #1007
2017-09-14 17:36:54 +01:00
Pete Batard 92c05556d1 [iso] add a warning for unsupported multi-extent ISO-9660 files
* This is related to issue #1007, which libcdio still needs to fix.
2017-09-11 19:06:51 +01:00
Pete Batard bb00e220ac [ui] more info field fixes
* Prevent text selection and try to force a redraw, to ensure the text is centered on update
* Also update the libcdio 'AL' workaround
2017-07-26 11:47:02 +01:00
Pete Batard 39e418fbe9 [iso] add work around for ISOs that use nonstandard Rock Ridge extensions
* Looking at you Kali Linux!
* Also silence the annoying 'from_733: broken byte order' warning
2017-07-21 13:11:44 +01: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 55b7d5c2da [misc] code cleanup
* Also fix WDK compilation issues
2017-04-25 20:25:50 +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 97b4e623cd [iso] update libcdio to latest
* Also update .gitignore for VS2017 files
2017-03-09 15:34:37 +01:00
Pete Batard 8a491e9877 [misc] update Clang solution for VS2017 2017-03-09 12:37:53 +01:00
Pete Batard 09482d53fe [iso] fix a libcdio log message 2016-07-31 18:23:50 +02:00
Pete Batard b204065f88 [clang] use the July Clang/C2 framework VS2015 update 2016-07-21 15:58:11 +01:00
Pete Batard de386329e4 [clang] fix breakage when opening ISO9660 images
* Even in MS compatibility mode, clang needs to be told how to pack structs
* Also fix a compilation warning with Link Time Code Generation
2016-06-04 22:09:25 +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 39d6b90447 [misc] fixes for Clang/C2 compilation support 2016-06-04 17:13:50 +01:00
Pete Batard e4bb1a6eb8 drop support for WDK's Windows XP targets
* Die, XP, die!!!
* Also fix a Coverity warning in checksum.c
2016-03-24 12:56:26 +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 818fa4da88 [misc] pocketful of enhancement and fixes - part 5
* Check compressed DD images for boot capability
* Add DisableLGP setting
* Silence libcdio errors when scanning non ISO images
* Ensure UI displays "No image selected" when relevant
* Also update Bled to latest
2015-02-11 23:22:18 +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 fbd0e00458 [oops] fix non Visual Studio builds
* ...that got broken in ea817cbc2c
2014-10-31 20:32:42 +00:00
Pete Batard ea817cbc2c [iso] update libcdio to v0.93
* Also fix a memory leak introduced vy v0.93 in cdio_free()
2014-10-31 18:52:23 +00:00