Log each rejected ELF header, range, and symbol reference. This
provides actionable diagnostics for malformed files without changing the
validation behavior.
ElfReader trusted table offsets and counts from standalone ELF files.
Malformed input could make it read and write past the loaded file buffer.
Validate the ELF header, table ranges, segment data, section data, and
string-table references before accessing them. Invalid files use the
existing executable boot failure path.
NetPlay save synchronization decoded remote LZO blocks with the unsafe
decoder and no output capacity. A malicious host could overflow a client
buffer with a block larger than its declared size.
Use the bounds-checking decoder, validate the declared output length, and
grow buffer results only after each checked block has been decoded.
Custom composable that switched between compact and medium size app bar depending on a combination of orientation and screen size. (Small app bar when horizontal on small devices, medium app bar otherwise. Medium app bar supports collapse on scroll.
Update Android dependencies and build tools to their latest available versions.
Rename the GameCube save magic constant to avoid a collision with the NDK 30 ARM64 signal context header.
We were registering the hotplug callback when starting the thread, but
deregistering it when shutting down GCAdapter as a whole. Because the
thread can start and stop potentially many times before GCAdapter shuts
down, this led to callbacks being registered when we already have
callbacks. On Android, this was making Dolphin's Kotlin code for
registering the callback throw an IllegalStateException.
To fix this, deregister the callback when stopping the thread.
Dolphin now uses the simulated memory size defined in `bi2.bin` to
adjust the memory size in the emulated console automatically.
If **Enable Emulated Memory Size Override** has been enabled by the
user, the fixed memory size specified for **MEM1** and **MEM2** are
still used as they were before.
Most retail games do not define the simulated memory size (Wii or
Triforce games), or define it to a value that matches the default 24 MiB
(GameCube games), so, in the general case, there is no behavior change.
One game that sets the simulated memory to a non-default value is the
debug build of _Mario Kart: Double Dash!!_, where the value is set to
48 MiB.
This enhancement is focused mainly to the modding community. Prior to
these changes, modded games with extended memory requirements would
fail to launch in Dolphin [with no indication of what the problem is] if
the user failed to set the emulated memory override to the correct
value. Now, modding tools can specify the simulated memory size in the
`bi2.bin` file to produce extended games that _just work_ in Dolphin,
without cumbersome instructions that can be overlooked by the user.
This is the 32-bit unsigned integer that is seen at offset `0x04` in the
`bi2.bin` file.
The intent is to study what games define values that departure from the
norm. Common values are 0 MiB (Wii games) and 24 MiB (GameCube games),
with some debug and demo builds featuring 48 MiB (e.g. the debug build
of _Mario Kart: Double Dash!!_).
The data structure of the `bi2.bin` file in which the simulated memory
size is set:
> **13.2 Disk header Information**
>
> this is loaded to the Address in `0x800000f4` when a disc is initialized by the IPL
>
> | offset | end | size | Description |
> | :------: | --- | :--: | --------------------- |
> | `0x0000` | | 4 | Debug-monitor Size |
> | `0x0004` | | 4 | Simulated Memory Size |
> | `0x0008` | | 4 | Argument offset |
> | `0x000c` | | 4 | Debug flag |
> | `0x0010` | | 4 | Track Location |
> | `0x0014` | | 4 | Track size |
> | `0x0018` | | 4 | Countrycode |
> | `0x001c` | | 4 | ? |
See https://hitmen.c02.at/files/yagcd/yagcd/chap13.html#sec13.2.
Most GameCube games set the value to `24 MiB`, which matches the
physical memory size. Most Wii games set the value to `0 MiB` (unset).
The debug build of _Mario Kart: Double Dash!!_ is one game that sets the
value to `48 MiB`.
Erase a removed pack from ResourcePack::<anonymous namespace>::packs
instead of only deleting the pack file from the disk.
This causes the repopulated table to actually display that the pack has
been removed (which previously only happened after restarting Dolphin or
hitting `Refresh`), and also removes the pack from the `Packs.ini` file.
Avoid accessing destroyed `QTableWidgetItem` by retrieving the desired
path from the item before it's destroyed.
In `ResourcePackManager::Remove` pointers to the selected items in `m_table_widget`
were saved in the local variable `items` before calling `Uninstall`.
`Uninstall` called `RepopulateTable` which called
`m_table_widget->clear()`, destroying the table's descendants. Upon
returning to `Remove` `items` then pointed to some of those destroyed descendants, and
passing `items[0]` to `GetResourcePackIndex` resulted in a call to
`item->row()` which was a use-after-free.
Fixes https://bugs.dolphin-emu.org/issues/14095.