Full error:
0wallet/migrate.cpp:554:35: runtime error: implicit conversion from type 'int64_t' (aka 'long') of value -1 (64-bit, signed) to type 'uint32_t' (aka 'unsigned int') changed the value to 4294967295 (32-bit, unsigned)
The code:
0uint32_t expected_last_page = (size / page_size) - 1;
This may lead to a fuzz runtime error when (size / page_size)
is 0
. I don’t think this can lead to issues for real users, because it can only happen with corrupt files and the next line should throw "Last page number could not fit in file"
, or in the case where outer_meta.last_page
is corrupt as well, and equal to 4294967295
, the following read should fail and throw.