mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge bitcoin/bitcoin#30248: refactor: Add explicit cast to expected_last_page to silence fuzz ISan
fa9cb101cf
refactor: Add explicit cast to expected_last_page to silence fuzz ISan (MarcoFalke) Pull request description: Fixes #30247 I don't think this implicit cast can lead to any bugs, so make it explicit to silence the fuzz integer sanitizer. Can be tested with: ``` FUZZ=wallet_bdb_parser UBSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" ./src/test/fuzz/fuzz /tmp/1376869be72eebcc87fe737020add634b1a29533 ``` After downloading the raw fuzz input from1376869be7
ACKs for top commit: dergoegge: utACKfa9cb101cf
Tree-SHA512: 226dcc58be8d70b4eec1657f232c9c6648b5dac5eb2706e7390e65ce0a031fbaf8afce97d71a535c8294467dca4757c96f294d8cc03d5e6a1c0a036b0e070325
This commit is contained in:
commit
c6de072a21
1 changed files with 1 additions and 1 deletions
|
@ -551,7 +551,7 @@ void BerkeleyRODatabase::Open()
|
|||
// }
|
||||
|
||||
// Check the last page number
|
||||
uint32_t expected_last_page = (size / page_size) - 1;
|
||||
uint32_t expected_last_page{uint32_t((size / page_size) - 1)};
|
||||
if (outer_meta.last_page != expected_last_page) {
|
||||
throw std::runtime_error("Last page number could not fit in file");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue