Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cellSaveData: funcFile improvements, some error checks added #7742

Merged
merged 5 commits into from
Mar 13, 2020

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Mar 9, 2020

  • Add more logging, simplify code to use std::string subfunctions and strcpy_trunc and add one more error condition.
  • Allow '_' at filenames start and extension.
  • Check if reading offset is valid, fix error code to CELL_SAVEDATA_ERROR_FAILURE.
  • Don't create an empty file on error of write ops.
  • Don't allow "." and ".." filenames on funcFile, return CELL_SAVEDATA_ERROR_BROKEN.
  • Check listSet->fixedListNum.
  • Check listSet->fixedList, listSet->focusDirName, listSet->newData->dirName for nullptr and its directory items names.
  • Check listSet->newData->iconPosition.
  • Check statSet->setParam->parental_level for old sdk.
  • Return an error if listSet->focusPosition is NEWDATA and listSet->newData is nullptr.
  • Simplify savedata directory list selection.
  • Fixed savedata lock after fmt::throw_exception.
  • Filter directory lists to allowed savedata directories.

Fixes #7738.

@elad335 elad335 changed the title WIP attempt to solve cellSaveData's param error 70 regression cellSaveData: funcFile improvements Mar 12, 2020
@elad335
Copy link
Contributor Author

elad335 commented Mar 12, 2020

Added some changes based on private hw tests.

@elad335
Copy link
Contributor Author

elad335 commented Mar 13, 2020

Added some error checks for fun.

@elad335 elad335 changed the title cellSaveData: funcFile improvements cellSaveData: funcFile improvements, some error checks added Mar 13, 2020
@elad335 elad335 force-pushed the sys_prx branch 2 times, most recently from f0de905 to bc7373d Compare March 13, 2020 13:53
Also extend the check to check empty name.
@elad335
Copy link
Contributor Author

elad335 commented Mar 13, 2020

  • Don't allow "." and ".." filenames on funcFile, return CELL_SAVEDATA_ERROR_BROKEN.

@elad335 elad335 requested a review from Nekotekina March 13, 2020 14:26
* Allow '_' at filenames start and extension.
* Check if reading offset is valid, fix error code to CELL_SAVEDATA_ERROR_FAILURE.
* Don't create empty file on error of write ops.
* Don't allow "." and ".." filenames on funcFile, return CELL_SAVEDATA_ERROR_BROKEN.
* Check listSet->fixedListNum.
* Check listSet->fixedList for nullptr and its directory items names.
* Check listSet->focusDirName for nullptr and directory name.
* Check listSet->newData->iconPosition.
* Check listSet->newData->dirName for nullptr and directory string.
* Check statSet->setParam->parental_level for old sdk.
* Return an error if listSet->focusPosition is NEWDATA and listSet->newData is nullptr.
* Simplify savedata directory list selection.
@elad335 elad335 force-pushed the sys_prx branch 5 times, most recently from a2b997c to 14b7342 Compare March 13, 2020 15:38
@isshininu
Copy link
Contributor

This PR also fixed same problem with saving in The Evil Within.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Haze [BLUS30094] regression as of 0.0.9-9791
3 participants