Commit 46ee71ed authored by Committed by Milan BrozBrowse files
Avoid needlessly large allocations in LUKS2 validation code.
In case LUKS2 backup segment creates gap in between last regular segment and backup segment report invalid metadata imediately. We stop on first error so there's no need to allocate large memory on heap (we may ran with mlock(MCL_FUTURE) set). Example: - total segments count is 3 - regular segments have keys "0" and "1" - first backup segment has key "42"