Commit Graph
10 Commits
Author SHA1 Message Date
Henrik Rydgård 78ef1eae82 Instead of flash0directory, have a NAND subdirectory under PSP, where you can keep flash0, flash1 etc.
Also make it configurable via command line.
2026-08-24 09:53:37 +02:00
Henrik Rydgård 9315c0953a GamepadEmu: bounds-check touch pointer IDs before use
TouchInput::id was used directly to index the global primaryButton[]
array (MultiTouchButton::Touch) and to shift pointer bitmasks
(PSPDpad/PSPStick/PSPCustomStick/GestureGamepad::Touch), guarded only
by a debug-only assert in one of the five call sites - a no-op in
release builds. input.id isn't always a small sequential slot in
[0, TOUCH_MAX_POINTERS): SDL assigns SDL_FingerID values directly,
Android pointer IDs can go up to 31, and UWP's TouchMapper allocates
one more slot (11) than TOUCH_MAX_POINTERS (10) and can also return -1
when it runs out of slots - all reachable through ordinary multi-touch
use, no malicious input required.

Also apply bounds check to the PER_GAME gesture config ints
(iDoubleTapGesture/iSwipeUp/Down/Left/Right) before indexing
GestureKey::keyList[] with them.

Additionally, minor cleanup on Android and moves the TouchMapper helper
out from UWP to InputState.h.
2026-08-12 09:47:13 +02:00
Henrik Rydgård 0eef5d0164 Use shared HasPathTraversal utility for savedata name validation
Replace the inline lambdas in the savedata dialog with the new
HasPathTraversal() helper in Core/Util/PathUtil.
2026-08-01 13:16:21 +02:00
Henrik Rydgård f3d7d8bc0c Fix Zip Slip in zip extraction and add unit test
A crafted zip with a parent-directory ("..") entry name could escape the
destination directory during extraction, writing arbitrary files on the
host (e.g. into startup/autostart folders). ExtractZipContents built the
output path by concatenating the raw zip entry name onto the destination
with no traversal check.

Changes:
- Add HasParentDirComponent() utility in Core/Util/PathUtil and use it in
  GameManager::ExtractZipContents to reject entries with a ".." component.
  Guard both the directory-creation and file-writing passes.
- Expose ExtractZipContents as public for testing.
- Add unittest/TestZipSlip which crafts a zip with a "../evil.txt" entry
  and verifies it is not written outside the destination directory.
2026-07-31 20:35:12 +02:00
Eric Warmenhoven 9b26df8283 libretro: fix ios/tvos builds 2026-03-08 12:16:52 -04:00
Henrik Rydgård 14ef83f06a Implement iOS "bookmark" support, to preserve permissions to recent files from iCloud 2026-03-07 15:04:49 +01:00
Henrik Rydgård 66b8e866fb iOS: Fix opening files from iCloud and other secure places. Note: Not compatible with "Recents" yet. 2026-03-07 09:19:31 +01:00
Henrik Rydgård cbcec3e27f Bugfix GetFriendlyPath, use in more places 2026-01-29 23:15:32 +01:00
Henrik Rydgård 1ed2f53385 Improve the InstallZipScreen a little 2026-01-29 22:51:28 +01:00
Henrik Rydgård b8fced5b41 Path code cleanup, move some UI code (#21037)
* Move a bunch of path logic into Core/Util/PathUtil.cpp/h

.

* Move GameImageView out from SaveDataScreen

* More cleanup, add a translation string
2025-11-25 00:44:24 +01:00