mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-19 08:01:34 -08:00
Compare commits
2 Commits
fix/addond
...
aviraxp-pa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30cd19ec9c | ||
|
|
1f1eb01a7d |
@@ -292,7 +292,7 @@ static int find_dtb_offset(const uint8_t *buf, unsigned sz) {
|
|||||||
auto fdt_hdr = reinterpret_cast<const fdt_header *>(curr);
|
auto fdt_hdr = reinterpret_cast<const fdt_header *>(curr);
|
||||||
|
|
||||||
// Check that fdt_header.totalsize does not overflow kernel image size or is empty dtb
|
// Check that fdt_header.totalsize does not overflow kernel image size or is empty dtb
|
||||||
// https://github.com/torvalds/linux/commit/7b937cc243e5b1df8780a0aa743ce800df6c68d1
|
// https://github.com/torvalds/linux/commit/7b937cc243e5b1df8780a0aa743ce800df6c68d1
|
||||||
uint32_t totalsize = fdt_hdr->totalsize;
|
uint32_t totalsize = fdt_hdr->totalsize;
|
||||||
if (totalsize > end - curr || totalsize <= 0x48)
|
if (totalsize > end - curr || totalsize <= 0x48)
|
||||||
continue;
|
continue;
|
||||||
@@ -913,8 +913,6 @@ void repack(Utf8CStr src_img, Utf8CStr out_img, bool skip_comp) {
|
|||||||
file_align();
|
file_align();
|
||||||
}
|
}
|
||||||
|
|
||||||
off.tail = lseek(fd, 0, SEEK_CUR);
|
|
||||||
|
|
||||||
// Proprietary stuffs
|
// Proprietary stuffs
|
||||||
if (boot.flags[SEANDROID_FLAG]) {
|
if (boot.flags[SEANDROID_FLAG]) {
|
||||||
xwrite(fd, SEANDROID_MAGIC, 16);
|
xwrite(fd, SEANDROID_MAGIC, 16);
|
||||||
@@ -925,6 +923,7 @@ void repack(Utf8CStr src_img, Utf8CStr out_img, bool skip_comp) {
|
|||||||
xwrite(fd, LG_BUMP_MAGIC, 16);
|
xwrite(fd, LG_BUMP_MAGIC, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
off.tail = lseek(fd, 0, SEEK_CUR);
|
||||||
file_align();
|
file_align();
|
||||||
|
|
||||||
// vbmeta
|
// vbmeta
|
||||||
|
|||||||
Reference in New Issue
Block a user