Don't allocate a Vec to pad with zeros. #473
No reviewers
Labels
No labels
bug
dependency
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
review-next
security
stub
tool
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: raito/lanzaboote#473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qm3ster/patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Might be worth it not to use
uefi::fs::FileSystem::read
, because it:info.file_size()
sizedVec
, so it reallocates the whole file on any paddingInstead, one
Vec<u8>
(or unsafe buffer) could be preallocated for kernel+pad+initrd+(pad+initrdN)* by iterating the metadata first, which the above method does internally, and thenRegularFile::read
used.Sounds good to me.
Testing is needed before merge.
5429e7b36b
to52fb329d1f
52fb329d1f
to30c949c07c
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.