Skip to content

Commit cf694e9

Browse files
Marton ILLESqkaiser
authored andcommitted
elf: fixed kernel initramfs padding calculation
1 parent cb9f6cd commit cf694e9

File tree

1 file changed

+1
-1
lines changed
  • unblob/handlers/executable

1 file changed

+1
-1
lines changed

unblob/handlers/executable/elf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def extract_initramfs(self, elf, inpath, outdir):
7373
endian=endian,
7474
)
7575

76-
padding = round_up(initramfs_size, 8) - initramfs_size
76+
padding = round_up(initramfs_size + 4, 8) - initramfs_size - 4
7777
initramfs_end = initramfs_size_offset - padding
7878
initramfs_start = initramfs_end - initramfs_size
7979

0 commit comments

Comments
 (0)