b666899f39b7778ad4a86aabd85087dbcf251573
fix: Remove unsafe ->Clone() on potentially null AccountInfoPtr Three AccountUtils methods (CreateDerivedAccount, CreateImportedAccount, CreateHardwareAccount) called ->Clone() on the return value of AddAccountSync/ImportBitcoinAccountSync/AddBitcoinHardwareAccountSync without null-checking first. When these functions return null (e.g. if HD key derivation fails), operator->() triggers DCHECK(ptr_) in struct_ptr.h:85, causing an intermittent crash in FilTxManagerUnitTest.ProcessHardwareSignatureError during SetUp. The Clone() calls were also unnecessary since these functions already return owned AccountInfoPtr values, not references to cached data. Resolves brave/brave-browser#53572
…
…
…
…
…
…
…
…
…
…
Brave Core
Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser
Follow @brave on Twitter for important announcements.
Resources
Community
You can ask questions and interact with the community in the following locations:
- Brave Community
communitychannel on Brave Software's Slack
Languages
C++
36.9%
HTML
31.6%
Swift
9.4%
TypeScript
9%
Java
4.8%
Other
8.1%