Netzenbot b666899f39 Fix null StructPtr dereference in wallet test AccountUtils (#34720)
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
2026-03-14 14:34:18 -04:00
2026-03-15 02:27:55 +09:00
2026-03-14 13:22:30 +00:00
2026-03-14 13:22:30 +00:00
2026-03-14 13:22:30 +00:00

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:

S
Description
No description provided
Readme MPL-2.0
3.8 GiB
Languages
C++ 36.9%
HTML 31.6%
Swift 9.4%
TypeScript 9%
Java 4.8%
Other 8.1%