mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 16:25:58 +03:00
[PR #628] [MERGED] crypto: Fix deallocation of key data while in use. #1676
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#1676
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/628
Author: @squidbus
Created: 8/28/2024
Status: ✅ Merged
Merged: 8/28/2024
Merged by: @georgemoralis
Base:
main← Head:pkg-fix📝 Commits (1)
4a6ce1ecrypto: Fix deallocation of key data while in use.📊 Changes
3 files changed (+299 additions, -422 deletions)
View changed files
📝
src/core/crypto/crypto.cpp(+32 -35)📝
src/core/crypto/crypto.h(+0 -4)📝
src/core/crypto/keys.h(+267 -383)📄 Description
A recent PR added destructors to the keyset classes. However, these classes get copied as part of
PKG, and when the original goes out of scope the keyset arrays are deleted, leaving invalid pointers in the copy.This resolves the issue by simply making the keyset data into static constants, rather than instance members allocated in the constructor.
Fixes https://github.com/shadps4-emu/shadPS4/issues/627
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.