Commit Graph
799 Commits
Author SHA1 Message Date
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 779cae6232 Reject path traversal in savedata name fields
gameName/saveName/fileName and the saveNameList entries are
guest-controlled and get concatenated into host filesystem paths, so a
crafted request could escape the save directory with ../ sequences.

- PSPSaveDialog::Init rejects requests whose name fields contain a path
  separator ('/' or '\') or are bare dot components.
- SavedataParam::SetPspParam rejects saveNameList entries the same way.
2026-08-01 13:16:21 +02:00
Henrik Rydgård 5194382b7b Fix out-of-bounds reads in PARAM.SFO parser
ReadSFO dereferenced index table entries without checking the table fit
within the buffer, and GetDataOffset had no bounds checks at all (reading
attacker-controlled offsets and strcmp'ing without a terminator guard).

- Validate the index table fits entirely within the buffer in ReadSFO.
- Add a size parameter to GetDataOffset and validate the index table,
  key/data table positions, and key string termination before use.
2026-07-31 20:54:17 +02:00
Ren 459aefb48b Savedata dialog: serialize ioThreadStatus (bump section to v3)
The s > 2 branch in PSPSaveDialog::DoState has been dead code since it
was written - the section version was never raised past 2, so
ioThreadStatus was reset to SAVEIO_NONE on every savestate load.
Loading a state that was saved while a savedata operation was in
flight then repeated the operation (or left the dialog waiting on a
completion that had already happened), instead of resuming from the
recorded status.

Restoring the value is safe: DoState joins the IO thread before
serializing, so the stored status is only ever SAVEIO_NONE or
SAVEIO_DONE, and the operation's effects are already part of the
serialized emulated RAM. Old (v2) states still load through the reset
path.
2026-07-27 16:19:26 +02:00
Henrik Rydgård beeafb92b9 Add more symbols to the Latin OSK keyboard
A few dupes, but meh.
2026-06-25 15:14:08 +02:00
Henrik Rydgård 95ce95e489 Add a new "Net" log category, do assorted cleanup 2026-06-13 14:43:59 +02:00
Henrik Rydgård cc0ece038c Clean up the string type in RequestCallback - somehow was both char* and std::string????
Might be related to #21695
2026-05-18 14:16:34 +02:00
Henrik Rydgård e23d866a95 Plumb through an error code for missing activity. Will later be used to improve the UI. 2026-05-11 10:52:36 +02:00
Henrik Rydgård 8304d8622a Hide the save/load indicator by default, add a (developer) setting. Also sneak in an adhoc server list bug fix.
Fixes #21523
2026-04-06 10:04:09 -06:00
Henrik Rydgård 133c36f145 Minor logging cleanup in savedata 2026-03-02 00:24:19 +01:00
Henrik Rydgård 3dc7aa4a65 Add workaround for the Silent Hill: Shattered Memories. Thanks fcrwr!
Fixes #13781
2026-02-23 15:19:03 +01:00
Henrik Rydgård dac2407a36 sceIo: Add support for microseconds in filetimes (not implemented in platforms yet) 2026-02-23 11:04:17 +01:00
Henrik Rydgård 40a5cd1509 Minor logging improvement, refresh gamescreen on deleted savedata 2026-02-19 16:05:00 +01:00
Henrik Rydgård 5a5c7028b9 Assorted warning fixes and data initialization to please valgrind 2026-02-19 11:24:46 +01:00
Henrik Rydgård 0dd77f896a A few more string length safety fixes in SavedataParam.cpp 2026-02-18 11:24:55 +01:00
Henrik Rydgård f97a3d09bd Savedata: Fix rare crash bug found in Google Play reports 2026-02-18 11:24:36 +01:00
Henrik Rydgård dad8df3860 More logspam reduction 2026-02-10 15:05:29 +01:00
Henrik Rydgård 4d07fd6176 Avoid writing 0-sized ICON1 or SND0
Presumably this should also apply to PIC1 and ICON0 but let's keep the
change minimal.

Fixes #20443
2026-02-10 09:11:05 +01:00
Henrik Rydgård 51c3058cf6 Replace "ForceFullScreen" with a way to prevent specific settings from being saved. 2026-02-02 09:25:49 +01:00
Henrik Rydgård 6c324c6782 Minor cleanup 2026-01-01 13:47:19 +01:00
Henrik Rydgård 5f7a937466 Rename ValidSize to ClampValidSizeAt 2025-12-30 20:31:07 +01:00
Henrik Rydgård f5a211884b Minor cleanups, comments
Comments and warnings
2025-12-30 20:31:06 +01:00
Henrik Rydgård 198d86a9b1 Move the PSP system language logic into sceUtility. 2025-11-04 11:48:47 +01:00
Henrik Rydgård 1c49ad7b29 Support screen rotation on iOS (unrestricted) 2025-10-22 15:13:21 +02:00
Henrik Rydgård f14c4dfb90 Add a compatibility flag to apply sum2012's workaround for Ghost Recon: Predator
I'm not confident in the behavior here, so let's change it only for this
game for now.

Replaces #20892

Fixes #20856
2025-10-21 15:23:12 +02:00
Henrik Rydgård 5751e202a5 Remove redundant .c_str() 2025-08-31 13:37:43 +02:00
Henrik Rydgård 7dde367ead Improve logging in sceUtility *GetStatus functions 2025-08-06 17:45:39 +02:00
Henrik Rydgård d0b25f186b Fix tracking for the savedata reminder for several invisible save types 2025-07-13 23:18:13 +02:00
Henrik Rydgård f410b7e6ea Show a tiny indicator in the top left of the screen when the game is saving or loading. 2025-07-10 15:11:59 +02:00
Henrik Rydgård 85a3635bfe Correct save/load detection for the reminder.
Was missing some critical logic.. oops.
2025-06-11 10:09:32 +02:00
Henrik Rydgård e2bfc48886 Sanity checks in Vulkan backend, PSPDialog 2025-05-14 00:39:00 +02:00
Henrik Rydgård 2fe004eb90 Savedata iothread: Don't alloc the std::thread 2025-04-30 15:53:55 +02:00
Henrik Rydgård ecff4d03ee Update the naming of functions called by SavedataParam::EncryptData. Thanks Linblow, and Nemo for the reminder 2025-04-23 16:49:04 +02:00
Henrik Rydgård ebcf6be42c When (successfully) using dyn_dns, remove fixed lookups.
Additionally some various cleanup.
2025-04-08 00:32:40 +02:00
Henrik Rydgård 242fd20798 Fix bug preventing the json from being fetched a second time 2025-04-07 22:14:36 +02:00
Henrik Rydgård 5f7b698012 Lots of logging and cleanup. 2025-04-07 21:40:52 +02:00
Henrik Rydgård 0ecd72416b Reduce overhead of logging further. 2025-03-25 23:09:11 +01:00
Henrik Rydgård 0f840e6240 Move JPEG error codes to the big enum, some include cleanup 2025-03-21 20:44:46 +01:00
Henrik Rydgård 999bf59ae1 Move mutex error codes into the big enum 2025-03-21 20:44:46 +01:00
Henrik Rydgård f14075e650 PPGe/savedata: Add a bunch of safety checks for png images. Fixes Digimon save crash, see #20125. 2025-03-21 10:07:42 +01:00
Henrik Rydgård 7a4d175e06 Port over some utility functions, fix bugs. 2025-03-18 09:36:32 +01:00
Henrik Rydgård 57ba231921 Repurpose the removed "PPSSPP doesn't support online" dialog to supply warning about WLAN switch off. 2025-03-05 13:43:50 +01:00
Henrik Rydgård 5080e9660a Remove an outdated hidden setting (bSavedataUpgrade) 2025-02-18 11:03:29 -06:00
Henrik Rydgård d7ebed2d66 AutoDNS load fix in some situations 2025-02-17 16:20:41 -06:00
Henrik Rydgård 9bee4192ba Implement exit confirmation when closing the window on Windows. 2025-02-17 13:09:11 -06:00
Henrik Rydgård 408d1b0916 Track execution time after save, add new setting for exit confirmation 2025-02-17 12:29:23 -06:00
Nemoumbra 9528d5d8be Added proper const overloads for PSPPointer methods 2025-02-12 03:26:01 +03:00
Henrik Rydgård d1e5b45b4b Consolidate the last spread-out error codes. 2025-02-04 12:34:49 -06:00
Henrik Rydgård d2c1c7b54f Consolidate even more error codes 2025-02-04 12:32:11 -06:00
Henrik Rydgård b2b0ff1753 Consolidate error codes in ErrorCodes.h 2025-02-04 11:53:00 -06:00