Deferencing the result of `std::max_element()` when `res.connections` has 0 elements leads to UB, and segfaults in practice.
Co-authored-by: iamamyth <user@example.com>
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Add macro definition for fuzzers
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Fix FuzzedDataProvider header missing problem
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Add README
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Provide static FuzzedDataProvider.h
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Update and enhance fuzzer
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Activate UBSan
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Fix fuzz target retrieval
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Remove bias selector and fix protocol lifespan
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Drop SIGALARM handling and fix bug on selectors
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Fix rpc request changes
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Add a new fuzzer profile that catch all expcetions
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Fix typo
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Add warning
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Fix four issues with wallet_keys_unlocker:
1. It won't decrypt if there are unlockers open simulataneously on multiple `wallet2` instances
2. It won't decrypt if the first unlocker was disabled (i.e. `locked=false`), even with a second non-disabled unlocker
3. If a destructor of an earlier unlocker is triggered before the destructor of a later unlocker, it will re-encrypt too early, while the second unlocker is still in scope
4. Calling the 3-parameter constructor with `locked=true` after an unlocker already exists will "double-encrypt" the spend key after its destructor since the local variable is `locked=false` and the field member is `locked=true`
Also, replace `wallet2::decrypt_account_for_multisig` with `wallet_keys_unlocker`.
The `while` loop condition was incorrect, which could lead to incomplete imports.
Also, setting `start` to an *undone* output speeds up the test by 16s on my machine.
fpaste.org has been seized by someone else and now links to a spam website, replaced it w/ a stable and reputable alternative (gnu.cat)
CONTRIBUTING.md: replace paste service
removed gnu.cat
added paste.debian.org
based on community usage and familiarity with the debian paste service