mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
fix(artifacts): detect AVB footers before boot page padding ends (#12046)
This commit is contained in:
1 parent
ffae857c20
commit
90550aa223
5 files changed
+62
-24
No files matched your search
@@ -22,6 +22,7 @@ import {
|
||||
ANDROID_BOOT_FIXED_LIMITS,
|
||||
AVB_FOOTER_SIZE,
|
||||
compressionFromPrefix,
|
||||
avbFooterOffset,
|
||||
inspectAvbFooter,
|
||||
parseAndroidBootHeader,
|
||||
parseVendorRamdiskTable,
|
||||
@@ -137,13 +138,13 @@ export class AndroidBootImageArtifactReader extends PositionalArtifactReader<And
|
||||
plans: readonly AndroidBootComponentPlan[],
|
||||
signal?: AbortSignal,
|
||||
): Promise<AvbFooterFacts> {
|
||||
const trailing = fileSize - header.imageEnd;
|
||||
const offset = avbFooterOffset(fileSize, header.dataEnd);
|
||||
this.assertOpen(signal);
|
||||
const tail =
|
||||
trailing >= AVB_FOOTER_SIZE
|
||||
offset !== null
|
||||
? await readArtifactFileBytes(
|
||||
handle,
|
||||
fileSize - AVB_FOOTER_SIZE,
|
||||
offset,
|
||||
AVB_FOOTER_SIZE,
|
||||
fileSize,
|
||||
signal,
|
||||
|
||||
Reference in new issue
Block a user