mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-11 18:43:47 +00:00
qcdt: include padding in the table length fields
This commit is contained in:
parent
f87ee3fcf9
commit
b45d922463
@ -261,8 +261,9 @@ static int dtb_patch(const qcdt_hdr *hdr, const char *in, const char *out) {
|
||||
val.second.offset = lseek(fd, 0, SEEK_CUR);
|
||||
auto fdt = val.second.fdt;
|
||||
fdt_pack(fdt);
|
||||
val.second.len = fdt_totalsize(fdt);
|
||||
xwrite(fd, fdt, val.second.len);
|
||||
int size = fdt_totalsize(fdt);
|
||||
xwrite(fd, fdt, size);
|
||||
val.second.len = do_align(size, page_size);
|
||||
free(fdt);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user