Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible package corruption on --delsign/resign/addsign
Make sure we don't overrun the original signature header when adjusting reserved size. Fixes a brainfart introduced in commit be950ea: the count reservation size is relative to the size of the new header, obviously. Another crucial difference is that when considering whether we can transplant the new signature header in the originals place we need to consider the real on-disk signature, not the size of its immutable region. The immutable region can be much much smaller than the physical header if eg the IMA signatures are misplaced outside it, making our calculations way off. Fixes: #3469
- Loading branch information